• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: do shell script hanging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script hanging


  • Subject: Re: do shell script hanging
  • From: "Mark J. Reed" <email@hidden>
  • Date: Thu, 10 Apr 2008 07:21:57 -0400

On Thu, Apr 10, 2008 at 7:19 AM, Mark J. Reed <email@hidden> wrote:
>  #!/bin/sh
>  prog="$1"
>  shift
>  exec "$prog" "$@" </dev/null >/dev/null  2>&1 &
>  echo $!

The first three lines could be replaced with just one:

exec "$@" </dev/null >/dev/null 2>&1 &

I took this from a longer script that does extra work based on the
command name, which it also logs, hence the circumlocution..
--
Mark J. Reed <email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >do shell script hanging (From: "Yvon Thoraval" <email@hidden>)
 >Re: do shell script hanging (From: Skeeve <email@hidden>)
 >Re: do shell script hanging (From: "Mark J. Reed" <email@hidden>)
 >Re: do shell script hanging (From: Bastiaan Boertien <email@hidden>)
 >Re: do shell script hanging (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: do shell script hanging
  • Next by Date: Re: What is the limit on osascript command ?
  • Previous by thread: Re: do shell script hanging
  • Next by thread: One Finder and one iTunes Question?
  • Index(es):
    • Date
    • Thread