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

Re: [perl #6847] strange behaviour when forking lots of times

Thread Previous
From:
Eric Brine
Date:
November 23, 2011 11:36
Subject:
Re: [perl #6847] strange behaviour when forking lots of times
Message ID:
CALJW-qGWpAN24DfPQTPUXNTfoq+0sjk8wk82Drfii450k65U=Q@mail.gmail.com
On Wed, Nov 23, 2011 at 2:27 PM, The Sidhekin <sidhekin@allverden.no> wrote:

>
>
> On Wed, Nov 23, 2011 at 8:24 PM, Eirik Berg Hanssen <
> Eirik-Berg.Hanssen@allverden.no> wrote:
>
>> On Wed, Nov 23, 2011 at 8:12 PM, Eric Brine <ikegami@adaelis.com> wrote:
>>
>>> I'm not clear on why fork failing would cause $_ to be changed from 'a'
>>> to 1.
>>
>>
>>   Me neither, but it does.  Or rather, evaluating the fork in a boolean
>> context does ...
>>
>
>   ... err, no, let's try again ... fork failing causes $_ to be changed
> from 'a' to undef.  Evaluatin the fork in a boolean context changes it
> (most likely further? or possibly instead?) to 1.
>

That's gotta be a bug.

What's really funny is changing from print to Devel::Peek's Dump($_) only
reveals "a".

Is $_ being changed, or is it stack corruption?

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About