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

Re: [PATCH] fixes exitstatus on win32

Thread Previous | Thread Next
From:
Gurusamy Sarathy
Date:
August 16, 2001 09:00
Subject:
Re: [PATCH] fixes exitstatus on win32
Message ID:
200108161600.f7GG0Ff32497@smtp3.ActiveState.com
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, 
>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 (ma
>kes more sense since perl_destruct actually executes
>code)

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? :)

Thanks.


Sarathy
gsar@ActiveState.com

Thread Previous | 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