diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-01 18:43:49 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-01 18:43:49 +0000 |
commit | cc3604b14c0748189384ba69182e0ae2c73a4d88 (patch) | |
tree | 3c98d9b2228bd2dded53f28930f03155b48dddb9 /perl.c | |
parent | 3c3eec57473df2067943d3a2bb444a3e95a38412 (diff) | |
download | perl-cc3604b14c0748189384ba69182e0ae2c73a4d88.tar.gz |
avoid "Callback called exit" error on intentional exit()
p4raw-id: //depot/perl@4609
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1406,7 +1406,7 @@ Perl_call_sv(pTHX_ SV *sv, I32 flags) /* my_exit() was called */ PL_curstash = PL_defstash; FREETMPS; - if (PL_statusvalue) + if (PL_statusvalue && !(PL_exit_flags & PERL_EXIT_EXPECTED)) Perl_croak(aTHX_ "Callback called exit"); my_exit_jump(); /* NOTREACHED */ @@ -1530,7 +1530,7 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags) /* my_exit() was called */ PL_curstash = PL_defstash; FREETMPS; - if (PL_statusvalue) + if (PL_statusvalue && !(PL_exit_flags & PERL_EXIT_EXPECTED)) Perl_croak(aTHX_ "Callback called exit"); my_exit_jump(); /* NOTREACHED */ @@ -3169,7 +3169,7 @@ Perl_call_list(pTHX_ I32 oldscope, AV *paramList) PL_curstash = PL_defstash; PL_curcop = &PL_compiling; CopLINE_set(PL_curcop, oldline); - if (PL_statusvalue) { + if (PL_statusvalue && !(PL_exit_flags & PERL_EXIT_EXPECTED)) { if (paramList == PL_beginav) Perl_croak(aTHX_ "BEGIN failed--compilation aborted"); else |