From: Rafael Garcia-Suarez Date: Mon, 20 Nov 2006 15:19:36 +0000 (+0000) Subject: Make undef $SIG{FOO} ignore the signal FOO X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ef3f8aa3fa68a53e4fb36a449b1b8f7b88d809d9;p=p5sagit%2Fp5-mst-13.2.git Make undef $SIG{FOO} ignore the signal FOO p4raw-id: //depot/perl@29327 --- diff --git a/mg.c b/mg.c index e4d7393..494e9fd 100644 --- a/mg.c +++ b/mg.c @@ -1459,7 +1459,7 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg) SvREFCNT_dec(to_dec); return 0; } - s = SvPV_force(sv,len); + s = SvOK(sv) ? SvPV_force(sv,len) : "IGNORE"; if (strEQ(s,"IGNORE")) { if (i) { #ifdef FAKE_PERSISTENT_SIGNAL_HANDLERS