From owner-freebsd-current Wed Jun 17 16:13:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA29135 for freebsd-current-outgoing; Wed, 17 Jun 1998 16:13:19 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from stevenson.cogsci.ed.ac.uk (stevenson144.cogsci.ed.ac.uk [129.215.144.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA29113 for ; Wed, 17 Jun 1998 16:13:10 -0700 (PDT) (envelope-from richard@cogsci.ed.ac.uk) Received: from cockburn.cogsci.ed.ac.uk (richard@cockburn [129.215.110.48]) by stevenson.cogsci.ed.ac.uk (8.8.7/8.8.7) with SMTP id AAA07721; Thu, 18 Jun 1998 00:13:06 +0100 (BST) Date: Thu, 18 Jun 1998 00:13:05 +0100 Message-Id: <22587.199806172313@cockburn.cogsci.ed.ac.uk> From: Richard Tobin Subject: Re: Bogus errno twiddling by lstat... To: Warner Losh , Terry Lambert In-Reply-To: Warner Losh's message of Wed, 17 Jun 1998 11:30:21 -0600 Organization: just say no Cc: current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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