• 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" hangs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "do shell script" hangs


  • Subject: Re: "do shell script" hangs
  • From: Christopher Nebel <email@hidden>
  • Date: Fri, 21 Jun 2002 12:29:35 -0700

On Friday, June 21, 2002, at 01:47 AM, Daisy wrote:

It is possible to detach a "do shell script" command using only shell
operators, though how to do so isn't particularly obvious. Try this:

do shell script "put_command_here >/dev/null 2>&1 &"

Of course, you'll have to deal with monitoring the task yourself. This
trick was originally discovered by Stuart Roebuck.

many thanks for this suggestion, but that woudn't help in my case (i wanted to make a shell script that redirects the standard output to a file (sth of this kind: nireport ... > filename) so using your "> /dev/null ..." will result nothing because it sends the output to 'nirvana'. (joel's perl daemon solution is a little bit complicated but worked fine for me)

Actually, a quick experiment here shows that the technique works just as well if you substitute a real file for /dev/null. The relevant part is that all output is directed away from the parent process, who then doesn't wind up waiting for it.


--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Mouting a server in OSX
  • Next by Date: RE: automating PDF creation
  • Previous by thread: Re: run-only AS apps - versions num?
  • Next by thread: on idle handler
  • Index(es):
    • Date
    • Thread