From: Gurusamy Sarathy Date: Tue, 28 Oct 1997 20:06:06 +0000 (-0500) Subject: [win32] Sync a change from local repository. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=00d579c5f79d1baaed14ef28a9c9de3c6d64f4d0;p=p5sagit%2Fp5-mst-13.2.git [win32] Sync a change from local repository. Message-Id: <199710290106.UAA11485@aatma.engin.umich.edu> Subject: [PATCH] Re: Core dump from using sockets w/ system or open(pipe) or "`" p4raw-id: //depot/win32/perl@306 --- diff --git a/mg.c b/mg.c index b7b09d3..8a7cfdd 100644 --- a/mg.c +++ b/mg.c @@ -1733,10 +1733,10 @@ Signal_t sighandler(int sig) { dSP; - GV *gv; + GV *gv = Nullgv; HV *st; SV *sv, *tSv = Sv; - CV *cv; + CV *cv = Nullcv; AV *oldstack; OP *myop = op; U32 flags = 0; @@ -1788,8 +1788,11 @@ sighandler(int sig) if (!cv || !CvROOT(cv)) { if (dowarn) warn("SIG%s handler \"%s\" not defined.\n", - sig_name[sig], GvENAME(gv) ); - return; + sig_name[sig], (gv ? GvENAME(gv) + : ((cv && CvGV(cv)) + ? GvENAME(CvGV(cv)) + : "__ANON__"))); + goto cleanup; } oldstack = curstack; @@ -1812,6 +1815,7 @@ sighandler(int sig) perl_call_sv((SV*)cv, G_DISCARD); SWITCHSTACK(signalstack, oldstack); +cleanup: if (flags & 1) savestack_ix -= 8; /* Unprotect save in progress. */ if (flags & 2) {