Re: forking a subprocess under scotty

Cary B. O'Brien (cobrien@access.digex.net)
Mon, 10 Mar 1997 09:02:40 -0500 (EST)

>
> Hi, everybody !!
> Does anyone know how can I make fork() in scotty , i. e. I need to
> call a programm(or tcl script, or something ) from scotty tcl script
> so that the "farther" script won`t wait till his child returns. A just
> start some new process working on it's own and continue to do my job
> in the parent .
>
This is more difficult than it seems. Or at least I usually have more
trouble with it than I expect!

You would think that you could jjust do exec cmd &, but tcl still waits
for stdout/stderr to close so it can get the result code, I think.

At one job we had to have tk callbacks rsh to another machine and start
things up. It took a LONG time to get things to work ok. At every
step, it seemed, we had to redirect stdin/stdout/stderror to/from
dev null. Sometimes you also have to use an intermediate shell script
that just starts what you want to do and exits to prevent zombies.

Could be worse. YOu could be using exec under NT. The TCL developers
said that there were 60 some-odd variations.

Post whatever you get working!

Good luck
-- cary
cobrien@access.digex.net

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.