summaryrefslogtreecommitdiff
path: root/scope.h
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-01-10 22:52:55 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-01-10 22:52:55 +0000
commitb03c0a3af9d8dc230dbf7f55955fdc7ce65f2403 (patch)
treea332c8a0e09b665ca07adc0aadd5f54aaaac366c /scope.h
parent25d920232779109764865e51a54577792f1390e3 (diff)
downloadperl-b03c0a3af9d8dc230dbf7f55955fdc7ce65f2403.tar.gz
Allow control of 2nd arg to segsetjmp() via -DSCOPE_SAVES_SIGNAL_MASK.
(So Alan and Ilya can try setting via hints.) Verified Linux "works" with it true and fails to re-enable SIGINT if false. Restoring sigmask in Perl_sighandler() if handler dies is not equivalent; doing the save everywhere seems to restart read() correctly, but just doing it once "round" the handler does not. p4raw-id: //depot/perlio@8401
Diffstat (limited to 'scope.h')
-rw-r--r--scope.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/scope.h b/scope.h
index 3e05962e68..d45bd94243 100644
--- a/scope.h
+++ b/scope.h
@@ -35,6 +35,10 @@
#define SAVEt_GENERIC_PVREF 34
#define SAVEt_PADSV 35
+#ifndef SCOPE_SAVES_SIGNAL_MASK
+#define SCOPE_SAVES_SIGNAL_MASK 1
+#endif
+
#define SSCHECK(need) if (PL_savestack_ix + need > PL_savestack_max) savestack_grow()
#define SSPUSHINT(i) (PL_savestack[PL_savestack_ix++].any_i32 = (I32)(i))
#define SSPUSHLONG(i) (PL_savestack[PL_savestack_ix++].any_long = (long)(i))
@@ -307,7 +311,7 @@ typedef void *(CPERLscope(*protect_proc_t)) (pTHX_ volatile JMPENV *pcur_env,
DEBUG_l(Perl_deb(aTHX_ "Setting up jumplevel %p, was %p\n", \
ce, PL_top_env)); \
JMPENV_PUSH_INIT_ENV(ce,NULL); \
- EXCEPT_SET_ENV(ce,PerlProc_setjmp((ce).je_buf, 1));\
+ EXCEPT_SET_ENV(ce,PerlProc_setjmp((ce).je_buf, SCOPE_SAVES_SIGNAL_MASK));\
(ce).je_noset = 1; \
} \
else \
@@ -356,7 +360,7 @@ typedef void *(CPERLscope(*protect_proc_t)) (pTHX_ volatile JMPENV *pcur_env,
&cur_env, PL_top_env)); \
cur_env.je_prev = PL_top_env; \
OP_REG_TO_MEM; \
- cur_env.je_ret = PerlProc_setjmp(cur_env.je_buf, 1); \
+ cur_env.je_ret = PerlProc_setjmp(cur_env.je_buf, SCOPE_SAVES_SIGNAL_MASK); \
OP_MEM_TO_REG; \
PL_top_env = &cur_env; \
cur_env.je_mustcatch = FALSE; \