From: Gurusamy Sarathy Date: Fri, 2 Oct 1998 03:45:37 +0000 (+0000) Subject: make warning about glob process failure optional X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4eb79ab512b1332d593701ae7f01c47eac3323b4;p=p5sagit%2Fp5-mst-13.2.git make warning about glob process failure optional p4raw-id: //depot/perl@1912 --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 08c73c3..8ccb16b 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1417,16 +1417,19 @@ and execute the specified command. (P) Something went badly wrong in the regular expression parser. -=item internal error: glob failed - -(P) Something went wrong with the external program(s) used for C -and C*.cE>. This may mean that your csh (C shell) is -broken. If so, you should change all of the csh-related variables in -config.sh: If you have tcsh, make the variables refer to it as if it -were csh (e.g. C); otherwise, make them all -empty (except that C should be C<'undef'>) so that Perl will -think csh is missing. In either case, after editing config.sh, run -C<./Configure -S> and rebuild Perl. +=item glob failed (%s) + +(W) Something went wrong with the external program(s) used for C +and C*.cE>. Usually, this means that you supplied a C +pattern that caused the external program to fail and exit with a nonzero +status. If the message indicates that the abnormal exit resulted in a +coredump, this may also mean that your csh (C shell) is broken. If so, +you should change all of the csh-related variables in config.sh: If you +have tcsh, make the variables refer to it as if it were csh (e.g. +C); otherwise, make them all empty (except that +C should be C<'undef'>) so that Perl will think csh is missing. +In either case, after editing config.sh, run C<./Configure -S> and +rebuild Perl. =item internal urp in regexp at /%s/ diff --git a/pp_hot.c b/pp_hot.c index 4ca41bb..75bdb4f 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -1258,8 +1258,12 @@ do_readline(void) IoFLAGS(io) |= IOf_START; } else if (type == OP_GLOB) { - if (!do_close(PL_last_in_gv, FALSE)) - warn("internal error: glob failed"); + if (!do_close(PL_last_in_gv, FALSE) && ckWARN(WARN_CLOSED)) { + warner(WARN_CLOSED, + "glob failed (child exited with status %d%s)", + STATUS_CURRENT >> 8, + (STATUS_CURRENT & 0xFF) ? ", core dumped" : ""); + } } if (gimme == G_SCALAR) { (void)SvOK_off(TARG);