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

Re: [PATCH] fixes exitstatus on win32

Thread Previous | Thread Next
Gurusamy Sarathy
August 16, 2001 09:00
Re: [PATCH] fixes exitstatus on win32
Message ID:
On Thu, 16 Aug 2001 17:26:30 +0200, "Arthur Bergman" wrote:
>Fixes the exitstatus in END blocks on win32. Probably also needed on netware, 
>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 (ma
>kes more sense since perl_destruct actually executes

Seems cleaner to me, and still allows old code to remain unmodified,
except for the "minor" problem of getting any exit status changes from
END blocks.

If we want to keep complete compatibility, it might be better to introduce
a flag bit in the interpreter structure that provides the old behavior
by default (i.e. perl_run() does END blocks), unless they set the bit,
in which case they get the new behavior.  I think I prefer doing this.

>@@ -317,9 +317,12 @@
> #else
>  exitstatus = perl_run(my_perl);
> #endif
>-    }
>+ perl_destruct(my_perl);
>+ exitstatus = STATUS_NATIVE_EXPORT;
>+ } else {
>+    perl_destruct(my_perl);
>+ }

Can we have the indentation and the cuddled-else fixed the way it
Ought To Be? :)



Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About