in reply to Re: Monitoring Child Process
in thread Monitoring Child Process
Thank you for your suggestion. I incorporated your suggestion by commenting this out... so that there is only one waitpid in the whole script.
And when I try to put a 'sleep 20' and the end of the main script, this is the output that I am getting.
And using the REAPER subroutine that you gave. But now two things came up. Under normal condition (without pressing ctrl-c), the parent script exits without 'waiting for the children to finish'.foreach (@all_kids) { waitpid ($_, 0); }
And when I try to put a 'sleep 20' and the end of the main script, this is the output that I am getting.
Process 1 exited. Process 1 exited.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Monitoring Child Process
by Marshall (Canon) on Oct 19, 2011 at 20:08 UTC | |
by Anonymous Monk on Oct 19, 2011 at 20:43 UTC | |
by Marshall (Canon) on Oct 20, 2011 at 01:28 UTC | |
by Anonymous Monk on Oct 20, 2011 at 04:00 UTC | |
by Marshall (Canon) on Oct 20, 2011 at 04:48 UTC | |
|
In Section
Seekers of Perl Wisdom