From owner-freebsd-current Mon Jun 22 22:20:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA28350 for freebsd-current-outgoing; Mon, 22 Jun 1998 22:20:46 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from alpha.xerox.com (omega.Xerox.COM [13.1.64.95]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id WAA28344 for ; Mon, 22 Jun 1998 22:20:45 -0700 (PDT) (envelope-from fenner@parc.xerox.com) Received: from mango.parc.xerox.com ([13.1.102.232]) by alpha.xerox.com with SMTP id <40675(1)>; Mon, 22 Jun 1998 22:20:06 PDT Received: from mango.parc.xerox.com (localhost [127.0.0.1]) by mango.parc.xerox.com (8.8.8/8.8.8) with ESMTP id WAA03529; Mon, 22 Jun 1998 22:20:03 -0700 (PDT) (envelope-from fenner@mango.parc.xerox.com) Message-Id: <199806230520.WAA03529@mango.parc.xerox.com> To: Terry Lambert cc: peter@netplex.com.au (Peter Wemm), joelh@gnu.org, fenner@parc.xerox.com, current@FreeBSD.ORG Subject: Re: Bogus errno twiddling by lstat... In-reply-to: Your message of "Mon, 22 Jun 1998 10:36:44 PDT." <199806221736.KAA11829@usr06.primenet.com> Date: Mon, 22 Jun 1998 22:20:02 PDT From: Bill Fenner Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <199806221736.KAA11829@usr06.primenet.com> Terry wrote: >Please don't quote the C standard to me; quote instead ... the >Single UNIX Specification. Ok. Under "Errors", The Single UNIX ® Specification, Version 2, Copyright © 1997 The Open Group says: Some functions provide the error number in a variable accessed through the symbol errno. ... The value of errno should only be examined when it is indicated to be valid by a function's return value. (I don't know where this is in the printed edition; it's susv2/xsh/errors.html in the HTML online edition) >This is *far* differrent than stating that the value is indeterminate >in the success case, which is what people are claiming. I didn't find your quote in the SUS, but the one I did find made it pretty clear that the value of errno may be indeterminate in the success case (since you're instructed not to inspect it unless you know an error has occurred). You might find it interesting to read the chapter on errno.h in P.J. Plauger's *The Standard C Library*. He makes it clear how little he (or, apparently, anyone involved with ANSI C) likes the errno interface. > 22622 ktrace NAMI "/etc/malloc.conf" >*******^^^^^^*************************** > 22622 fum NAMI "/etc/malloc.conf" >*******^^^****************************** malloc.conf is being readlink()'d by *two*different*programs*... Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message