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
Tony Cook
September 13, 2011 17:17
Re: [perl #98934] set{u,g}id doesn't clear $! on success
Message ID:
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.


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