Re: do shell script without blocking?
Re: do shell script without blocking?
- Subject: Re: do shell script without blocking?
- From: "Adam K. Wuellner" <email@hidden>
- Date: Wed, 16 Feb 2005 08:20:28 -0600
On Feb 16, 2005, at 7:08 AM, Stephen Jonke wrote:
Is there any way to use do shell script without it blocking until the
script run completes? Putting an & at the end of the command doesn't
help.
Technical Note TN2065
do shell script in AppleScript
<http://developer.apple.com/technotes/tn2002/tn2065.html#TNTAG5>
<quote>
Q: I want to start a background server process; how do I make do shell
script not wait until the command completes?
A: Use "do shell script "command > file_path 2>&1 &"". do shell script
will return immediately with no result and your AppleScript script will
be running in parallel with your shell script. The shell script's
output will go into file_path; if you don't care about the output, use
"/dev/null". There is no direct support for getting or manipulating the
background process from AppleScript, but see the next question.
</quote>
Did you try redirecting the output to a file or /dev/null? I'm not
sure why that makes a difference, but it does.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden