develooper Front page | perl.perl5.porters | Postings from November 2003

Re: $^E bug and perl 5.8.0

Thread Previous | Thread Next
Dan Sugalski
November 19, 2003 08:08
Re: $^E bug and perl 5.8.0
Message ID:
On Wed, 19 Nov 2003, Rafael Garcia-Suarez wrote:

> Dan Sugalski wrote:
> > Basically you're using a variable that can be affected by external things
> > in a way that pretty much guarantees that external things will be
> > happening. That it changes isn't much of a surprise. ($!/$^E may get
> > modified by some signal handlers too, depending on what you do, so there's
> > not even any guarantee that "$^E = 42; $^E++;" will end up with $^E set to
> > 43.
> Using the Mac OS X equivalent of truss/strace might help to find out
> why errno changes there.

My bet would be that the print triggers an errno update, which strikes me
as perfectly reasonable. A syscall could be the result there, and syscalls
can twiddle errno if they want to. A bit excessive if nothing goes wrong,
perhaps, but not out of order.


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai                         have teddy bears and even
                                      teddy bears get drunk

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