From: Malcolm Beattie Date: Fri, 3 Oct 1997 11:53:51 +0000 (+0000) Subject: Reliable thread signal handling. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c23142e2edb5ee317dcd6cd29300b6f2196357db;p=p5sagit%2Fp5-mst-13.2.git Reliable thread signal handling. p4raw-id: //depot/perl@102 --- diff --git a/global.sym b/global.sym index 161f166..cde9997 100644 --- a/global.sym +++ b/global.sym @@ -1082,6 +1082,7 @@ setenv_getix share_hek sharepvn sighandler +sighandlerp skipspace stack_grow start_subparse diff --git a/mg.c b/mg.c index 404afef..db8356f 100644 --- a/mg.c +++ b/mg.c @@ -784,7 +784,7 @@ MAGIC* mg; } if (SvTYPE(sv) == SVt_PVGV || SvROK(sv)) { if (i) - (void)rsignal(i, sighandler); + (void)rsignal(i, sighandlerp); else *svp = SvREFCNT_inc(sv); return 0; @@ -811,7 +811,7 @@ MAGIC* mg; if (!strchr(s,':') && !strchr(s,'\'')) sv_setpv(sv, form("main::%s", s)); if (i) - (void)rsignal(i, sighandler); + (void)rsignal(i, sighandlerp); else *svp = SvREFCNT_inc(sv); } diff --git a/perl.c b/perl.c index 61961a7..f08def4 100644 --- a/perl.c +++ b/perl.c @@ -164,6 +164,7 @@ register PerlInterpreter *sv_interp; nrs = newSVpv("\n", 1); rs = SvREFCNT_inc(nrs); + sighandlerp = sighandler; MUTEX_INIT(&malloc_mutex); MUTEX_INIT(&sv_mutex); MUTEX_INIT(&eval_mutex); diff --git a/perl.h b/perl.h index 5080c1b..824f76a 100644 --- a/perl.h +++ b/perl.h @@ -1384,6 +1384,7 @@ EXT U32 * profiledata; EXT int maxo INIT(MAXO);/* Number of ops */ EXT char * osname; /* operating system */ EXT char * sh_path INIT(SH_PATH); /* full path of shell */ +EXT Sighandler_t sighandlerp; EXT XPV* xiv_arenaroot; /* list of allocated xiv areas */ EXT IV ** xiv_root; /* free xiv list--shared by interpreters */