Date: Thu, 18 Jun 1998 10:10:00 +0200 (CEST) From: Wolfgang Helbig <helbig@Informatik.BA-Stuttgart.DE> To: imp@village.org, richard@cogsci.ed.ac.uk, tlambert@primenet.com Cc: current@FreeBSD.ORG Subject: Re: Bogus errno twiddling by lstat... Message-ID: <199806180810.KAA05630@RVC1.Informatik.BA-Stuttgart.DE>
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. The wording in intro(2) is misleading. It should be: Successful calls never set errno to zero; > I believe ANSI C has a similar requirement. No, from the standard: The value of errno my be set to nonzero by a library function call whether or not there is an error ... > You should only examine errno after an error, but you are allowed to have > had intervening successful system calls. This would be nice, but a program that depends on this behaviour is not portable. Wolfgang 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?199806180810.KAA05630>