Re: do shell script hanging
Re: do shell script hanging
- Subject: Re: do shell script hanging
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 8 Apr 2008 07:12:58 -0400
I don't know why you need AS for a simple launcher, but Skeeve is mostly right.
What the & does is return control to the shell (the one started by "do
shell script" in this case) immediately, so that e.g. you could put
another command within the same string after the '&' and both commands
would run at the same time, instead of the second not starting until
the first one exits. But it doesn't help with allowing the shell
itself to exit (i.e. return to Applescript) while one of its spawned
commands is still running. For that to work you need to detach the
spawned command from its controlling virtual terminal.
Skeeve's example is not quite complete since it doesn't detach
standard input, only output and error.
So try this:
do shell script "/Applications/.../firefox ... </dev/null >/dev/null 2>&1 &"
Also, if you're trying to run multiple Firefox profiles
simultaneously, don't forget to include "-no-remote". Otherwise if any
version is running with any profile it will just switch to that
instead of launching a new instance.
On 4/8/08, Skeeve <email@hidden> wrote:
> You didn't read the documentation. Detach STDIN and STDERR from
> AppleScript and happy you'll be ;-)
>
> do shell script "/Applications/Firefox2.app/Contents/MacOS/firefox -P toto
> 2>/dev/console 1>/dev/console &"
>
> Or something that suits your needs better.
> _______________________________________________
> 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
>
--
Sent from Gmail for mobile | mobile.google.com
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