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;
In reply to how to determine pipe process terminated or alive by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |