diff options
author | Artur Bergman <sky@nanisky.com> | 2001-08-29 07:37:50 +0000 |
---|---|---|
committer | Artur Bergman <sky@nanisky.com> | 2001-08-29 07:37:50 +0000 |
commit | 8815fa0e033a75de9e84da580e92dda1e9189d58 (patch) | |
tree | 95dbe9ba70c9d8365ee59757c56bbce90ff1f432 /miniperlmain.c | |
parent | 47de4e93f8616edfbd1b8b8a2f1b803b497e9aa1 (diff) | |
download | perl-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.c | 8 |
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); |