Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
My os is Debian. Both works but which is more correct$p = open P, 'xxx|' 1) while (sysread P) {...}; close P; wait(); 2) while (1) {...if($p==waitpid($p,WNOHANG)){last}}; close P;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to determine pipe process terminated or alive
by Zaxo (Archbishop) on Jun 16, 2007 at 15:22 UTC | |
|
Re: how to determine pipe process terminated or alive
by kyle (Abbot) on Jun 18, 2007 at 02:57 UTC |