U32 flags = 0;
I32 o_save_i = PL_savestack_ix;
XPV *tXpv = PL_Xpv;
+ sigjmp_buf jmp;
+ Sighandler_t handler;
#if defined(WIN32) && defined(PERL_IMPLICIT_CONTEXT)
PERL_SET_THX(aTHXo); /* fake TLS, see above */
PUSHs(sv);
PUTBACK;
- call_sv((SV*)cv, G_DISCARD);
+ call_sv((SV*)cv, G_DISCARD|G_EVAL);
POPSTACK;
+ if (SvTRUE(ERRSV)) {
+#ifdef HAS_SIGACTION
+ /* Handler "died", for example to get out of a restart-able read().
+ * Before we re-do that on its behalf re-enable the signal which was
+ * blocked by the system when we entered.
+ */
+ sigset_t set;
+ sigemptyset(&set);
+ sigaddset(&set,sig);
+ sigprocmask(SIG_UNBLOCK, &set, NULL);
+#else
+ /* Not clear if this will work */
+ (void)rsignal(sig, SIG_IGN);
+ (void)rsignal(sig, PL_sighandlerp);
+#endif
+ Perl_die(aTHX_ Nullch);
+ }
cleanup:
if (flags & 1)
PL_savestack_ix -= 8; /* Unprotect save in progress. */
#define SAVEt_PADSV 35
#ifndef SCOPE_SAVES_SIGNAL_MASK
-#define SCOPE_SAVES_SIGNAL_MASK 1
+#define SCOPE_SAVES_SIGNAL_MASK 0
#endif
#define SSCHECK(need) if (PL_savestack_ix + need > PL_savestack_max) savestack_grow()