Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jun 1998 14:49:02 -0500 (CDT)
From:      Joel Ray Holveck <joelh@gnu.org>
To:        tlambert@primenet.com
Cc:        fenner@parc.xerox.com, tlambert@primenet.com, fenner@parc.xerox.com, peter@netplex.com.au, current@FreeBSD.ORG
Subject:   Re: Bogus errno twiddling by lstat...
Message-ID:  <199806201949.OAA17700@detlev.UUCP>
In-Reply-To: <199806192152.OAA23766@usr08.primenet.com> (message from Terry Lambert on Fri, 19 Jun 1998 21:52:47 %2B0000 (GMT))
References:   <199806192152.OAA23766@usr08.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>> However, normal library
>> functions are explicitly allowed to modify errno even if no error
>> occurs.
> Allowed to.
> Should they, however?
> I think "no".

Whether it's a good idea or not, portable programs should be written
to check errno only on errors.  Our platform is not the only one that
does this; some will set errno=ENOTTY when you don't write to a tty,
etc, etc.

If, however, you don't like our malloc's current implementation, and
think that errno should be saved and restored across a successful
call, and that the lost cycles would be worthwhile, then diffs would
be perfectly welcome, I'm sure.

I won't write them, because I think it's unnecessary, and have other
things to do.

Happy hacking,
joelh

-- 
Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan
   Fourth law of programming:
   Anything that can go wrong wi
sendmail: segmentation violation - core dumped

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?199806201949.OAA17700>