subprocesses lifecycle



hi.

I have a perl script that forks several subprocesses at various times.

I use the open "process_name |" syntax, and then use select to read
multiple process outputs, and have a timeout on all these subprocesses.

If the timeout is reached, I want to immediately exit my script with an
error message.

Currently, when I detect the timeout, I call die "error message". the
message is displayed, but the script does not return until subprocesses
finish (this may take several minutes, depending on what the
subprocesses do).

Is there a way to force the end of all subprocesses when calling die?

best regards,

Matthieu
.



Relevant Pages

  • Re: subprocesses lifecycle
    ... subprocesses finish (this may take several minutes, ... investigate why your script attempts to collect zombies. ... writer (I intentionally say 'writer' but 'child', ... child of B) intentionally closes pipe or just ...
    (comp.lang.perl.misc)
  • Re: subprocesses lifecycle
    ... but the script does not return until subprocesses ... sleep 1;} ... investigate why your script attempts to collect zombies. ... No one can kill process which hangs in syscall till the process ...
    (comp.lang.perl.misc)
  • Re: subprocesses lifecycle
    ... I have a perl script that forks several subprocesses at various times. ... and have a timeout on all these subprocesses. ... Each successful pipe open will return the child process id. ...
    (comp.lang.perl.misc)
  • managing multiple subprocesses
    ... run multiple subprocesses from a python script and then wait until all ... subprocesses have completed before continuing. ... So the commands I am using are: ... Xgrid is a system for parallel computation on Mac OS X. ...
    (comp.lang.python)
  • managing multiple subprocesses
    ... run multiple subprocesses from a python script and then wait until all ... subprocesses have completed before continuing. ... So the commands I am using are: ... Xgrid is a system for parallel computation on Mac OS X. ...
    (comp.lang.python)