From: Dave Mitchell Date: Tue, 9 May 2006 11:43:55 +0000 (+0000) Subject: allow exit during fold_constants X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5db49ba3a175392c88bf67c5576fcca80075f35e;p=p5sagit%2Fp5-mst-13.2.git allow exit during fold_constants eg BEGIN { $SIG{__WARN__} = sub{exit};} "a" == "b" p4raw-id: //depot/perl@28135 --- diff --git a/op.c b/op.c index 970f27a..c27d785 100644 --- a/op.c +++ b/op.c @@ -2227,6 +2227,11 @@ Perl_fold_constants(pTHX_ register OP *o) SvTEMP_off(sv); } break; + case 2: + /* my_exit() was called; propagate it */ + JMPENV_POP; + JMPENV_JUMP(2); + /* NOTREACHED */ case 3: /* Something tried to die. Abandon constant folding. */ /* Pretend the error never happened. */ @@ -2235,7 +2240,7 @@ Perl_fold_constants(pTHX_ register OP *o) break; default: JMPENV_POP; - /* Don't expect 1 (setjmp failed) or 2 (something called my_exit) */ + /* Don't expect 1 (setjmp failed) */ Perl_croak(aTHX_ "panic: fold_constants JMPENV_PUSH returned %d", ret); }