in reply to I got IPC::Open3 to work!
1) The docs say "open3() does not wait for and reap the child process after it exits." You need to call waitpid on children that have completed.
2) Your return value are not the best. You return true when when open3 fails. You also return true on success.
3) I find it odd that you return undef when can_read returns a file handle you didn't give it. It shouldn't happen, so I would just ignore the error, since it shouldn't happen anyway. The safest way to handle it would be to do something like:
$err .= "Error from select: can_ready returned bad handle\n"; $select->remove($fh);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: I got IPC::Open3 to work!
by Tanktalus (Canon) on Jul 23, 2005 at 13:37 UTC | |
by ikegami (Patriarch) on Jul 23, 2005 at 16:35 UTC | |
|
Re^2: I got IPC::Open3 to work!
by harleypig (Monk) on Jul 24, 2005 at 16:01 UTC |