From: Gurusamy Sarathy Date: Sun, 24 Oct 1999 13:47:17 +0000 (+0000) Subject: don't allow SIGCHLD to be ignored at startup, or wait*() and X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0b5b802dfab417fc30b7370676e248947fdbf3e0;p=p5sagit%2Fp5-mst-13.2.git don't allow SIGCHLD to be ignored at startup, or wait*() and $? break p4raw-id: //depot/perl@4440 --- diff --git a/perl.c b/perl.c index d5b6d43..71b3b94 100644 --- a/perl.c +++ b/perl.c @@ -201,6 +201,7 @@ perl_construct(pTHXx) init_i18nl10n(1); SET_NUMERIC_STANDARD(); + #if defined(PERL_SUBVERSION) && PERL_SUBVERSION > 0 sprintf(PL_patchlevel, "%7.5f", (double) PERL_REVISION + ((double) PERL_VERSION / (double) 1000) @@ -942,6 +943,21 @@ print \" \\@INC:\\n @INC\\n\";"); validate_suid(validarg, scriptname,fdscript); +#if defined(SIGCHLD) || defined(SIGCLD) + { +#ifndef SIGCHLD +# define SIGCHLD SIGCLD +#endif + Sighandler_t sigstate = rsignal_state(SIGCHLD); + if (sigstate == SIG_IGN) { + if (ckWARN(WARN_SIGNAL)) + Perl_warner(aTHX_ WARN_SIGNAL, + "Can't ignore signal CHLD, forcing to default"); + (void)rsignal(SIGCHLD, (Sighandler_t)SIG_DFL); + } + } +#endif + if (PL_doextract) find_beginning(); diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 0c7a0c7..6344ee4 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -1404,16 +1404,6 @@ See L. but this did not follow some numeric unpack specification. See L. -=item Repeat count in pack overflows - -(F) You can't specify a repeat count so large that it overflows -your signed integers. See L. - -=item Repeat count in unpack overflows - -(F) You can't specify a repeat count so large that it overflows -your signed integers. See L. - =item /%s/: Unrecognized escape \\%c passed through (W) You used a backslash-character combination which is not recognized @@ -1504,6 +1494,15 @@ so it was truncated to the string shown. (P) For some reason you can't check the filesystem of the script for nosuid. +=item Can't ignore signal CHLD, forcing to default + +(W) Perl has detected that it is being run with the SIGCHLD signal +(sometimes known as SIGCLD) disabled. Since disabling this signal +will interfere with proper determination of exit status of child +processes, Perl has reset the signal to its default value. +This situation typically indicates that the parent program under +which Perl may be running (e.g. cron) is being very careless. + =item Can't modify non-lvalue subroutine call (F) Subroutines meant to be used in lvalue context should be declared as @@ -1746,6 +1745,16 @@ could be a potential Year 2000 problem. See Server error. +=item Repeat count in pack overflows + +(F) You can't specify a repeat count so large that it overflows +your signed integers. See L. + +=item Repeat count in unpack overflows + +(F) You can't specify a repeat count so large that it overflows +your signed integers. See L. + =item realloc() of freed memory ignored (S) An internal routine called realloc() on something that had already diff --git a/pod/perldiag.pod b/pod/perldiag.pod index a6a723c..18abdea 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -826,6 +826,15 @@ L. (F) The "goto subroutine" call can't be used to jump out of an eval "string". (You can use it to jump out of an eval {BLOCK}, but you probably don't want to.) +=item Can't ignore signal CHLD, forcing to default + +(W) Perl has detected that it is being run with the SIGCHLD signal +(sometimes known as SIGCLD) disabled. Since disabling this signal +will interfere with proper determination of exit status of child +processes, Perl has reset the signal to its default value. +This situation typically indicates that the parent program under +which Perl may be running (e.g. cron) is being very careless. + =item Can't localize through a reference (F) You said something like C, which Perl can't currently