Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jun 1998 15:33:15 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Garance A Drosihn <drosih@rpi.edu>
Cc:        current@FreeBSD.ORG
Subject:   Re: Bogus errno twiddling by lstat... 
Message-ID:  <199806210733.PAA27299@spinner.netplex.com.au>
In-Reply-To: Your message of "Fri, 19 Jun 1998 18:08:54 -0400." <v04011710b1b090f1c21f@[128.113.24.47]> 

next in thread | previous in thread | raw e-mail | index | archive | help
Garance A Drosihn wrote:
> One question I have is:
> 
> Is there any reason that we must let lstat clobber the value of
> errno?  Could we just add a few-line update somewhere which
> saves the value of errno on entry to lstat, and *if* no error
> occurs then reset errno before returning to the caller of lstat?
> 
> Or does this start us down a path of having all kinds of system
> routines saving copies of errno?
> 
> Note that I'm not really interested in whether lstat has the
> "right" to clobber errno.  I'm just wondering what advantage
> there is in having it continue to clobber errno.

Don't worry, lstat() isn't clobbering errno, it never has and never will.

The "problem" was that the person reporting it was misinterpreting his 
results and using a bogus test program.

malloc() (called by printf() in the test program) has been patched so that
it will not change errno when starting up for the first time, even though
it's perfectly allowed to.

Cheers,
-Peter
--
Peter Wemm <peter@netplex.com.au>   Netplex Consulting



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806210733.PAA27299>