summaryrefslogtreecommitdiff
path: root/miniperlmain.c
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2001-08-29 07:37:50 +0000
committerArtur Bergman <sky@nanisky.com>2001-08-29 07:37:50 +0000
commit8815fa0e033a75de9e84da580e92dda1e9189d58 (patch)
tree95dbe9ba70c9d8365ee59757c56bbce90ff1f432 /miniperlmain.c
parent47de4e93f8616edfbd1b8b8a2f1b803b497e9aa1 (diff)
downloadperl-8815fa0e033a75de9e84da580e92dda1e9189d58.tar.gz
END{} can change the return value even if we die from BEGIN{}
p4raw-id: //depot/perl@11783
Diffstat (limited to 'miniperlmain.c')
-rw-r--r--miniperlmain.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/miniperlmain.c b/miniperlmain.c
index eec3993ca6..f92ea3ee23 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);