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

Re: [perl #98934] set{u,g}id doesn't clear $! on success

Thread Previous | Thread Next
From:
Tony Cook
Date:
September 13, 2011 17:17
Subject:
Re: [perl #98934] set{u,g}id doesn't clear $! on success
Message ID:
20110914001748.GA20302@mars.tony.develop-help.com
On Wed, Sep 14, 2011 at 01:34:13AM +0200, Paul Johnson wrote:
> The problem in perl is that $! is intimately bound to errno, and you have
> no business doing anything with errno except examining it immediately
> after a failed system call.  IIRC, on some systems you cannot assign to
> errno anyway since it can be implemented as a macro expanding to a
> function.

errno is required to expand to a modifiable lvalue by both c89 and
c99, so this isn't an issue.

Tony

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