develooper Front page | perl.perl5.porters | Postings from December 2010

Re: Turn $$ into a magical readonly variable that always fetchesgetpid()

Thread Previous | Thread Next
From:
Paul LeoNerd Evans
Date:
December 30, 2010 13:17
Subject:
Re: Turn $$ into a magical readonly variable that always fetchesgetpid()
Message ID:
20101230211658.GE3066@cel.leo
On Wed, Dec 29, 2010 at 03:24:33PM -0700, Tom Christiansen wrote:
> > I know there's at least one XS module on CPAN that does a similar
> > dance to correct this. I'm very much in favor of this, IMO the current
> > situation is a premature optimization that only causes trouble.
> 
> > Leon
> 
> I'd even go so far as to suggest that $$ *not* mapping to getpid() 
> is a bug.  I'm surprised that there's code that lets it not get 
> updated correctly.  It is conceptually intended to map to getpid().

Purely idle speculation, but if $$ behaves this way currently, what of
$< $> $( $)  ? Do these cache their values, or are they magical to
get{,e}{u,g}id() ?

I'll go off sourcediving in a moment once I've finished some unrelated
stuff and take a look...

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/


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