diff options
author | Slaven Rezic <srezic@iconmobile.com> | 2009-01-08 13:05:58 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-01-19 12:25:19 +0100 |
commit | b3647a361211e9f2a6bf737a259cceab1db864a9 (patch) | |
tree | f8e441b5248b5a2bd2e76c625175e8c57154897d /util.c | |
parent | 4c6e94b1e729ad5095947e2c098f9651932479d7 (diff) | |
download | perl-b3647a361211e9f2a6bf737a259cceab1db864a9.tar.gz |
about warnings if forks fail in Perl_my_popen
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) { |