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

RE: [PATCH] fixes exitstatus on win32

Thread Previous | Thread Next
From:
Arthur Bergman
Date:
August 16, 2001 09:44
Subject:
RE: [PATCH] fixes exitstatus on win32
Message ID:
066c01c12673$7aa7db00$052aa8c0@foo
> 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.

Making my life more complicated :). 

So if I understood you correct

void perl_destruct becomes int perl_destruct
default is to still run END blocks in perl_run
flag set and we run END blocks in perl_destruct

Can I use an already existing bit field for this, or is a new variable needed? Should it be truly global or per interpreter?

Arthur


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