summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorGerard Goossen <gerard@ggoossen.net>2009-11-04 12:36:30 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2009-11-08 14:53:41 +0100
commit6bd7445c6d3b53823883c456e32ea27ce24bfc5c (patch)
treea970dc6bd10efac39c12c6163c8baf6cc75012ae /perl.c
parent3d22c4f05aed968c6c562e40be30222328d66f6b (diff)
downloadperl-6bd7445c6d3b53823883c456e32ea27ce24bfc5c.tar.gz
Make my_exit behave the same as the Perl exit. And add tests for it
Rationale: This makes the behaviour of my_exit consistent, so it no longer depends on whether a subroutine was called using call_sv or as a normal using an entersub op. Previously, the exit code was sometimes converted to an exception.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/perl.c b/perl.c
index dbb2081b8e..64ab7319d1 100644
--- a/perl.c
+++ b/perl.c
@@ -2610,8 +2610,6 @@ Perl_call_sv(pTHX_ SV *sv, VOL I32 flags)
PL_curstash = PL_defstash;
FREETMPS;
JMPENV_POP;
- if (PL_statusvalue && !(PL_exit_flags & PERL_EXIT_EXPECTED))
- Perl_croak(aTHX_ "Callback called exit");
my_exit_jump();
/* NOTREACHED */
case 3:
@@ -2712,8 +2710,6 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags)
PL_curstash = PL_defstash;
FREETMPS;
JMPENV_POP;
- if (PL_statusvalue && !(PL_exit_flags & PERL_EXIT_EXPECTED))
- Perl_croak(aTHX_ "Callback called exit");
my_exit_jump();
/* NOTREACHED */
case 3:
@@ -4585,16 +4581,6 @@ Perl_call_list(pTHX_ I32 oldscope, AV *paramList)
PL_curcop = &PL_compiling;
CopLINE_set(PL_curcop, oldline);
JMPENV_POP;
- if (PL_statusvalue && !(PL_exit_flags & PERL_EXIT_EXPECTED)) {
- if (paramList == PL_beginav)
- Perl_croak(aTHX_ "BEGIN failed--compilation aborted");
- else
- Perl_croak(aTHX_ "%s failed--call queue aborted",
- paramList == PL_checkav ? "CHECK"
- : paramList == PL_initav ? "INIT"
- : paramList == PL_unitcheckav ? "UNITCHECK"
- : "END");
- }
my_exit_jump();
/* NOTREACHED */
case 3: