From: Artur Bergman Date: Wed, 29 Aug 2001 07:37:50 +0000 (+0000) Subject: END{} can change the return value even if we die from BEGIN{} X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8815fa0e033a75de9e84da580e92dda1e9189d58;p=p5sagit%2Fp5-mst-13.2.git END{} can change the return value even if we die from BEGIN{} p4raw-id: //depot/perl@11783 --- diff --git a/miniperlmain.c b/miniperlmain.c index eec3993..f92ea3e 100644 --- a/miniperlmain.c +++ b/miniperlmain.c @@ -72,12 +72,10 @@ main(int argc, char **argv, char **env) } PL_exit_flags |= PERL_EXIT_DESTRUCT_END; exitstatus = perl_parse(my_perl, xs_init, argc, argv, (char **)NULL); - if (!exitstatus) { + if (!exitstatus) perl_run(my_perl); - exitstatus = perl_destruct(my_perl); - } else { - perl_destruct(my_perl); - } + + exitstatus = perl_destruct(my_perl); perl_free(my_perl);