Re: do shell script
Re: do shell script
- Subject: Re: do shell script
- From: Steven Angier <email@hidden>
- Date: Tue, 09 Jul 2002 10:24:55 +1000
On 9/7/02 5:28 AM, "Christopher Nebel" <email@hidden> wrote:
>
Resending this to the list, since I read Steven's private email first...
>
>
On Sunday, July 7, 2002, at 04:06 AM, Steven Angier wrote:
>
>
> I am having trouble with a particular "do shell script" command. This
>
> command sends the start command to the FileMaker Server daemon. The
>
> problem is that the script hangs until the server is stopped. ... This
>
> might make more sense if this "fmserverd" process belonged to a shell
>
> window, like top or ping, but it does not. I am able to run the start
>
> command from the terminal and continue to use that terminal window for
>
> other things.
>
>
"do shell script" is defined to wait until the command you give it
>
completes, or more precisely, returns EOF from its stdout and stderr.
>
The fact that fmserverd apparently daemonizes itself when run from a
>
terminal session but *not* from "do shell script" is a little peculiar,
>
I'll admit -- I'll have to do some checking there.
>
>
In any case, there is a standard way to run a "do shell script" command
>
detached, so "do shell script" returns immediately and the command
>
proceeds on its merry way:
>
>
do shell script "put_command_here > /dev/null 2>&1 &"
>
>
The "/dev/null" can actually be any file, but the output from daemons
>
typically isn't interesting. This question comes up about every month
>
or two on one of the AppleScript lists -- I've really got to get that
>
"do shell script" FAQ published.
Thanks, Chris. That worked.
Unfortunately though, because of my earlier efforts using an AppleScript
proxy app to run the shell script, any AppleScript app I run now spawns a
process named "FMServer Config", even after several restarts. I guess a
rebuild is in order?
Steven Angier
Macscript.com
_______________________________________________
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.