summaryrefslogtreecommitdiff
path: root/miniperlmain.c
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2001-08-17 04:18:11 +0000
committerArtur Bergman <sky@nanisky.com>2001-08-17 04:18:11 +0000
commit31d77e546f9eed28b984703264e32f2200f7aa8b (patch)
treebfa3d2b80ddab3b2f4e6292b4ee50a09666b5907 /miniperlmain.c
parent453946077c880e7dc58ef4fa7340353d6caec987 (diff)
downloadperl-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.c9
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);