in reply to EINTR and sysread()
In fact, if you install a signal handler for SIGCHLD, perl won't keep track of the exit status for you, so I would use such a signal handler only if there are other compelling reasons to do so. In that case you'll have to do something like this:
our $pid; # remember the child's pid our $status; sub handle_sigchld { my $wpid = waitpid -1, WNOHANG; # use POSIX for WNOHANG if ($wpid == $pid) { $status = $?; } } ... $pid = open(INPIPE, "...|");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: EINTR and sysread()
by bot403 (Beadle) on Apr 05, 2008 at 00:33 UTC |