Re: do shell script
Re: do shell script
- Subject: Re: do shell script
- From: Peter Gort <email@hidden>
- Date: Mon, 8 Jul 2002 19:46:00 +1000
Interesting suggestion James, I thought you'd hit the jackpot, but
unfortunately the daemon doesn't launch! AppleScript does NOT hang
though, so I reckon you are right on the money that it can't detach the
process, even with the Ampersand on the end of the command to background
it.
the command I used was
<path to fmserverd> start -c <path to config file> > /dev/null &
I also tried redirecting the command as Jon suggested, have another app
perform the command and have my script just instruct the app.
Unfortunately it still doesn't work, AppleScript still locks up.
One of my colleagues at work is stumped by exactly the same problem, I
went to work this morning and said "I ran into this problem on the
weekend" and he said "don't tell me, you can't start the daemon!".
Turns out he spent quite a bit of time on this too. he's also got a
friend of his working on it.
I hope there IS an answer... is there another device that it can have
output directed to besides /dev/null?
Peter
On Monday, July 8, 2002, at 07:38 AM, James Sentman wrote:
Sorry Jon, I should have mentioned...
I have tried backgrouding the process by appending " &" to the command.
I have also tried putting it in "with timeout...end timeout" clause.
I even tried putting the command in a shell script and then just
calling it in the "do shell script".
Unfortunately, the problem remains. When AppleScript tries to execute
either the start or stop commands to fmserverd, AppleScript hangs
until fmserverd is no longer running.
I have no idea if this will help with an applescript started shell, but
it does apply to other languages. I've noticed that you cannot detach
some shell commands unless you redirect stdout to somewhere.
Try adding this to the end of the command line:
" > /dev/null &"
and see if that allows it to detach properly.
Let me know what happens, one way or the other.
Thanks,
James
_______________________________________________
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.