On 8/23/05, Rick Delaney <[EMAIL PROTECTED]> wrote:
> My footnote was paraphrased from `man 2 wait` and IMO the described
> behaviour is a bug.  And it must have been a bug in someone else's
> opinion too since wait/waitpid do not behave like that on Linux.  At
> least they don't for me with kernel 2.6.8 and a C program.  They behave
> the SysV way (return -1 and set ECHILD when SIG_IGN).  I guess the man
> page is out of date.
> 
> So perl is behaving exactly like the underlying system call.  Sorry
> for any confusion.

I applied the following clarification to perlfunc :

Change 25339 by [EMAIL PROTECTED] on 2005/08/30 18:55:46

        Clarify the cases where system() returns 1,
        per a suggestion of Rick Delaney (bug #36976)

Affected files ...

... //depot/perl/pod/perlfunc.pod#490 edit

Differences ...

==== //depot/perl/pod/perlfunc.pod#490 (text) ====

@@ -6012,11 +6012,12 @@
 of C<IO::Handle> on any open handles.
 
 The return value is the exit status of the program as returned by the
-C<wait> call.  To get the actual exit value, shift right by eight (see below).
-See also L</exec>.  This is I<not> what you want to use to capture
+C<wait> call.  To get the actual exit value, shift right by eight (see
+below). See also L</exec>.  This is I<not> what you want to use to capture
 the output from a command, for that you should use merely backticks or
 C<qx//>, as described in L<perlop/"`STRING`">.  Return value of -1
-indicates a failure to start the program (inspect $! for the reason).
+indicates a failure to start the program or an error of the wait(2) system
+call (inspect $! for the reason).
 
 Like C<exec>, C<system> allows you to lie to a program about its name if
 you use the C<system PROGRAM LIST> syntax.  Again, see L</exec>.

Reply via email to