in reply to Re: Re: Re: Re: Perl IPC: Checking Exit Status of Child Process
in thread Perl IPC: Checking Exit Status of Child Process
1) That requires IPC of some sort.
2) TMTOWTDI.
2a) You could increment a status variable meant specifically for this purpose before the fork() in the parent, and each child would then get their private version of that variable after the fork() at the value that was current during the fork(). You could then run a different sub or exec() a different file based on the value of that variable.
2b) This is more complex than the above. You could have each child communicate back to the parent to ask.
2c) You could keep a file/database entry for each task that has been started (like a pid file) and start whichever one is next.
My vote for #2 is 2a.
Christopher E. Stith
use coffee;