This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Clarify the cases where system() returns 1,
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 30 Aug 2005 18:55:46 +0000 (18:55 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 30 Aug 2005 18:55:46 +0000 (18:55 +0000)
per a suggestion of Rick Delaney (bug #36976)

p4raw-id: //depot/perl@25339

pod/perlfunc.pod

index 63fba1d..09d98b0 100644 (file)
@@ -6012,11 +6012,12 @@ to set C<$|> ($AUTOFLUSH in English) or call the C<autoflush()> method
 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>.