Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jun 1998 00:13:05 +0100
From:      Richard Tobin <richard@cogsci.ed.ac.uk>
To:        Warner Losh <imp@village.org>, Terry Lambert <tlambert@primenet.com>
Cc:        current@FreeBSD.ORG
Subject:   Re: Bogus errno twiddling by lstat... 
Message-ID:  <22587.199806172313@cockburn.cogsci.ed.ac.uk>
In-Reply-To: Warner Losh's message of Wed, 17 Jun 1998 11:30:21 -0600

next in thread | raw e-mail | index | archive | help
> No.  When a system call returns success, the value of errno is
> undefined.

No!  A successful system call leaves it *unchanged*.  From intro(2):

     Successful calls never set errno; once set, it remains
     until another error occurs.

I believe ANSI C has a similar requirement.

You should only examine errno after an error, but you are allowed to have
had intervening successful system calls.

-- Richard

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?22587.199806172313>