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

RE: [PATCH] fixes exitstatus on win32

Thread Previous | Thread Next
Arthur Bergman
August 16, 2001 09:44
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, 
> >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?


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