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
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;
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;
perl_call_sv((SV*)cv, G_DISCARD);
SWITCHSTACK(signalstack, oldstack);
+cleanup:
if (flags & 1)
savestack_ix -= 8; /* Unprotect save in progress. */
if (flags & 2) {