#endif
(PL_signals & PERL_SIGNALS_UNSAFE_FLAG))
/* Call the perl level handler now--
- * with risk we may be in malloc() etc. */
+ * with risk we may be in malloc() or being destructed etc. */
#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
(*PL_sighandlerp)(sig, NULL, NULL);
#else
(*PL_sighandlerp)(sig);
#endif
else {
+ if (!PL_psig_pend) return;
/* Set a flag to say this signal is pending, that is awaiting delivery after
* the current Perl opcode completes */
PL_psig_pend[sig]++;
else {
i = (I16)mg->mg_private;
if (!i) {
- mg->mg_private = i = whichsig(s); /* ...no, a brick */
+ i = whichsig(s); /* ...no, a brick */
+ mg->mg_private = (U16)i;
}
if (i <= 0) {
if (sv && ckWARN(WARN_SIGNAL))