In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c973c02eeb03288a3fd6f93372b7ab2b8a75de66?hp=4c6e94b1e729ad5095947e2c098f9651932479d7>

- Log -----------------------------------------------------------------
commit c973c02eeb03288a3fd6f93372b7ab2b8a75de66
Author: Rafael Garcia-Suarez <[email protected]>
Date:   Mon Jan 19 12:28:00 2009 +0100

    Add warning category
    
    in perldiag.pod for new warning "Can't fork, trying again in 5 seconds"
    added in the parent commit

M       pod/perldiag.pod

commit b3647a361211e9f2a6bf737a259cceab1db864a9
Author: Slaven Rezic <[email protected]>
Date:   Thu Jan 8 13:05:58 2009 +0100

    about warnings if forks fail in Perl_my_popen

M       pod/perldiag.pod
M       util.c
-----------------------------------------------------------------------

Summary of changes:
 pod/perldiag.pod |    7 ++++++-
 util.c           |    6 +++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index cb82633..5a3fed5 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -757,11 +757,16 @@ If you didn't mean to use a Unicode property, escape the 
C<\p>, either
 by C<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, until
 possible C<\E>).
 
-=item Can't fork
+=item Can't fork: %s
 
 (F) A fatal error occurred while trying to fork while opening a
 pipeline.
 
+=item Can't fork, trying again in 5 seconds
+
+(W pipe) A fork in a piped open failed with EAGAIN and will be retried
+after five seconds.
+
 =item Can't get filespec - stale stat buffer?
 
 (S) A warning peculiar to VMS.  This arises because of the difference
diff --git a/util.c b/util.c
index c4fa794..86c06f5 100644
--- a/util.c
+++ b/util.c
@@ -2288,6 +2288,8 @@ Perl_my_popen_list(pTHX_ const char *mode, int n, SV 
**args)
            }
            return NULL;
        }
+       if (ckWARN(WARN_PIPE))
+           Perl_warner(aTHX_ packWARN(WARN_PIPE), "Can't fork, trying again in 
5 seconds");
        sleep(5);
     }
     if (pid == 0) {
@@ -2433,9 +2435,11 @@ Perl_my_popen(pTHX_ const char *cmd, const char *mode)
                PerlLIO_close(pp[1]);
            }
            if (!doexec)
-               Perl_croak(aTHX_ "Can't fork");
+               Perl_croak(aTHX_ "Can't fork: %s", Strerror(errno));
            return NULL;
        }
+       if (ckWARN(WARN_PIPE))
+           Perl_warner(aTHX_ packWARN(WARN_PIPE), "Can't fork, trying again in 
5 seconds");
        sleep(5);
     }
     if (pid == 0) {

--
Perl5 Master Repository

Reply via email to