Re: Spawning separate processes with "do shell script"
Re: Spawning separate processes with "do shell script"
- Subject: Re: Spawning separate processes with "do shell script"
- From: Adrian <email@hidden>
- Date: Mon, 25 Mar 2002 16:07:46 -0500
You're right, it does work. The problem was that I had already
redirected stdin and stdout to files and had missed stderr. Oops. Thanks
for the help. I can see how this might be implemented in an OSAX, but I
have no idea of how to create one. Perhaps you could point me to some
sample code or an OSAX programmer's HOWTO.
-- Adrian
On Monday, March 25, 2002, at 01:36 PM, garbanzito wrote:
at 2002 03 24, 13:10 -0500, they whom i call Adrian wrote:
I have tried this, but it doesn't work. I believe that AppleScript is
not blocking on output, but rather waiting for the sh process to exit.
Is there perhaps a more general way to fork off the command? Any other
suggestions would be welcome.
hmm, i have tried it several times and it *did* work. yes AS
is blocking on the shell process, but the shell process is
blocking on the output of its child process. if you
background the child process, and redirect its output, the
shell process terminates and leaves the child process
running. i have even created root-owned processes that
stayed alive past logout with this technique. perhaps there
are special circumstances for the command you were trying to
run.
as to a "more general way", it seems you want an
asynchronous version of "do shell script". perhaps this
could be implemented as an OSAX, or perhaps some kin do of
"shell script server" could be written in perl. in general
AS is not much of an asynchronous language though.
-- steve harley email@hidden
_______________________________________________
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.