diff options
author | Artur Bergman <sky@nanisky.com> | 2001-08-17 04:18:11 +0000 |
---|---|---|
committer | Artur Bergman <sky@nanisky.com> | 2001-08-17 04:18:11 +0000 |
commit | 31d77e546f9eed28b984703264e32f2200f7aa8b (patch) | |
tree | bfa3d2b80ddab3b2f4e6292b4ee50a09666b5907 /miniperlmain.c | |
parent | 453946077c880e7dc58ef4fa7340353d6caec987 (diff) | |
download | perl-31d77e546f9eed28b984703264e32f2200f7aa8b.tar.gz |
Adds PERL_EXIT_DESTRUCT_END to PL_exit_flags which if set moves END block running to perl_destruct, changes prototype of perl_destruct to return exitstatus.
p4raw-id: //depot/perl@11702
Diffstat (limited to 'miniperlmain.c')
-rw-r--r-- | miniperlmain.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/miniperlmain.c b/miniperlmain.c index ee09fbe802..9995b2b732 100644 --- a/miniperlmain.c +++ b/miniperlmain.c @@ -70,14 +70,13 @@ main(int argc, char **argv, char **env) perl_construct(my_perl); PL_perl_destruct_level = 0; } - + PL_exit_flags |= PERL_EXIT_DESTRUCT_END; exitstatus = perl_parse(my_perl, xs_init, argc, argv, (char **)NULL); if (!exitstatus) { - exitstatus = perl_run(my_perl); - perl_destruct(my_perl); - exitstatus = STATUS_NATIVE_EXPORT; + perl_run(my_perl); + exitstatus = perl_destruct(my_perl); } else { - perl_destruct(my_perl); + perl_destruct(my_perl); } perl_free(my_perl); |