This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
clarify meaning of waitpid returning 0 [perl #127080]
authorLukas Mai <l.mai@web.de>
Fri, 1 Jan 2016 14:45:47 +0000 (15:45 +0100)
committerLukas Mai <l.mai@web.de>
Tue, 5 Jan 2016 11:26:24 +0000 (12:26 +0100)
pod/perlfunc.pod

index d27806c..1dba05a 100644 (file)
@@ -9051,8 +9051,9 @@ X<waitpid>
 =for Pod::Functions wait for a particular child process to die
 
 Waits for a particular child process to terminate and returns the pid of
-the deceased process, or C<-1> if there is no such child process.  On some
-systems, a return value of 0 indicates that there are processes still running.
+the deceased process, or C<-1> if there is no such child process.  A
+non-blocking wait (with L<WNOHANG|POSIX/WNOHANG> in FLAGS) can return 0 if
+there are child processes matching PID but none have terminated yet.
 The status is returned in C<$?> and C<${^CHILD_ERROR_NATIVE}>.
 
 A PID of C<0> indicates to wait for any child process whose process group ID is