END{} can change the return value even if we die from BEGIN{}
Artur Bergman [Wed, 29 Aug 2001 07:37:50 +0000 (07:37 +0000)]
p4raw-id: //depot/perl@11783

miniperlmain.c

index eec3993..f92ea3e 100644 (file)
@@ -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);