http://www.perlmonks.org?node_id=284462

tid has asked for the wisdom of the Perl Monks concerning the following question:

Greetings enlightened monks,

At what point does the open call return, when used to open a process using the pipe symbol ("|")? Obviously, open is asynchronous (as perl knows nothing about how the long the process will hang around when it starts it), but what criteria does Perl have to satisfy before the open call returns?

Our problem comes from the fact that we have a somewhat flakey executable which we use for testing. Sometimes it hangs on start up and manages to hang the test scripts as well. As we're using about 30 of these processes for testing, we would like to determine which executable is causing the problem. The script that spawns the process could write the process IDs of processes it has started to a log file, but if the parent process is blocked on the open call, we're stuck.....

Many thanks,
Mike