summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-08 18:59:40 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-08 18:59:40 +0000
commit5c1546dc48d585e2ab2e244b01f0213280b12017 (patch)
tree2a1fc6dd13e2a614f5ae35ef24107bdc77f5e7f9 /mg.c
parentab2f3c4a71e82c5e73898a746d576abd20c32de8 (diff)
downloadperl-5c1546dc48d585e2ab2e244b01f0213280b12017.tar.gz
Move the csighandler to be a data variable so that
things like DLL trampolines can't mess up the code variables the Perl_csighandler (seen in Cygwin: Perl_csighandler in POSIX extension was different than in main executable). p4raw-id: //depot/perl@20565
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mg.c b/mg.c
index dc1666ab60..b272c7a3ff 100644
--- a/mg.c
+++ b/mg.c
@@ -1144,7 +1144,7 @@ Perl_magic_clearsig(pTHX_ SV *sv, MAGIC *mg)
#endif
#ifdef FAKE_DEFAULT_SIGNAL_HANDLERS
sig_defaulting[i] = 1;
- (void)rsignal(i, &Perl_csighandler);
+ (void)rsignal(i, PL_csighandlerp);
#else
(void)rsignal(i, SIG_DFL);
#endif
@@ -1183,7 +1183,7 @@ Perl_csighandler(int sig)
dTHX;
#endif
#ifdef FAKE_PERSISTENT_SIGNAL_HANDLERS
- (void) rsignal(sig, &Perl_csighandler);
+ (void) rsignal(sig, PL_csighandlerp);
if (sig_ignoring[sig]) return;
#endif
#ifdef FAKE_DEFAULT_SIGNAL_HANDLERS
@@ -1213,7 +1213,7 @@ Perl_csighandler_init(void)
#ifdef FAKE_DEFAULT_SIGNAL_HANDLERS
dTHX;
sig_defaulting[sig] = 1;
- (void) rsignal(sig, &Perl_csighandler);
+ (void) rsignal(sig, PL_csighandlerp);
#endif
#ifdef FAKE_PERSISTENT_SIGNAL_HANDLERS
sig_ignoring[sig] = 0;
@@ -1306,7 +1306,7 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg)
}
if (SvTYPE(sv) == SVt_PVGV || SvROK(sv)) {
if (i) {
- (void)rsignal(i, &Perl_csighandler);
+ (void)rsignal(i, PL_csighandlerp);
#ifdef HAS_SIGPROCMASK
LEAVE;
#endif
@@ -1322,7 +1322,7 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg)
if (i) {
#ifdef FAKE_PERSISTENT_SIGNAL_HANDLERS
sig_ignoring[i] = 1;
- (void)rsignal(i, &Perl_csighandler);
+ (void)rsignal(i, PL_csighandlerp);
#else
(void)rsignal(i, SIG_IGN);
#endif
@@ -1333,7 +1333,7 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg)
#ifdef FAKE_DEFAULT_SIGNAL_HANDLERS
{
sig_defaulting[i] = 1;
- (void)rsignal(i, &Perl_csighandler);
+ (void)rsignal(i, PL_csighandlerp);
}
#else
(void)rsignal(i, SIG_DFL);
@@ -1348,7 +1348,7 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg)
if (!strchr(s,':') && !strchr(s,'\''))
sv_insert(sv, 0, 0, "main::", 6);
if (i)
- (void)rsignal(i, &Perl_csighandler);
+ (void)rsignal(i, PL_csighandlerp);
else
*svp = SvREFCNT_inc(sv);
}
@@ -2518,7 +2518,7 @@ Perl_sighandler(int sig)
#else
/* Not clear if this will work */
(void)rsignal(sig, SIG_IGN);
- (void)rsignal(sig, &Perl_csighandler);
+ (void)rsignal(sig, PL_csighandlerp);
#endif
#endif /* !PERL_MICRO */
Perl_die(aTHX_ Nullformat);