Message-Id: <
20010827172111.89491.qmail@onion.perl.org>
p4raw-id: //depot/perl@11759
Wait for a child process to change state. This is identical to Perl's
builtin C<waitpid()> function, see L<perlfunc/waitpid>.
- $pid = POSIX::waitpid( -1, &POSIX::WNOHANG );
+ $pid = POSIX::waitpid( -1, POSIX::WNOHANG );
print "status = ", ($? / 256), "\n";
=item wcstombs
# Wait for the child to return or for the timeout to expire.
do {
- $child = waitpid($pid, &WNOHANG);
+ $child = waitpid($pid, WNOHANG);
$ret = $?;
} until time > ($time + $timeout) or $child;
use POSIX ":sys_wait_h";
#...
do {
- $kid = waitpid(-1,&WNOHANG);
+ $kid = waitpid(-1, WNOHANG);
} until $kid == -1;
then you can do a non-blocking wait for all pending zombie processes.