develooper Front page | perl.perl5.porters | Postings from August 2001

[PATCH] fixes exitstatus on win32

Thread Next
From:
Arthur Bergman
Date:
August 16, 2001 08:21
Subject:
[PATCH] fixes exitstatus on win32
Message ID:
00e701c12667$d2bdb6e0$21000a0a@vogw2kdev
Fixes the exitstatus in END blocks on win32. Probably also needed on netware, wince.

Would it be too daring to change the prototype for perl_destruct from

void perl_destruct to int perl_destruct and have it return the exit status (makes more sense since perl_destruct actually executes
code)

--- win32/perllib.c.old Thu Aug 16 17:05:10 2001
+++ win32/perllib.c Thu Aug 16 17:17:13 2001
@@ -317,9 +317,12 @@
 #else
  exitstatus = perl_run(my_perl);
 #endif
-    }
+ perl_destruct(my_perl);
+ exitstatus = STATUS_NATIVE_EXPORT;
+ } else {
+    perl_destruct(my_perl);
+ }

-    perl_destruct(my_perl);
     perl_free(my_perl);
 #ifdef USE_ITHREADS
     if (new_perl) {



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About