baxy77bax has asked for the wisdom of the Perl Monks concerning the following question:
i have a problem. i need to wait on a zombie process to finish so that i can execute a script that joins all created outputs into one joined output. what i know is the pid of very zombie process. forking and then waiting is not an option because my processes are running on diferent machines through ssh so pid for a forked process on second machine is tied to a ssh call and not the process running on that machine.
all i can think of is to create a sleeping while loop to wait on a process, but this seams very dirty. can somebody help me clean myself up :).
thank you !!
UPDATE:
PS
it seams i left something out. all the processes are run in bg because i need one attached instance of the process for something else in the fg. so waiting on ssh proc through waitpid() is not going to work... sorry for not mentioning that before !!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: wait for process to finish
by moritz (Cardinal) on Nov 04, 2009 at 15:11 UTC |