From owner-freebsd-current@FreeBSD.ORG Mon Nov 24 15:00:12 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08AD716A4CE for ; Mon, 24 Nov 2003 15:00:12 -0800 (PST) Received: from fafoe.narf.at (chello212186121237.14.vie.surfer.at [212.186.121.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5088C43FAF for ; Mon, 24 Nov 2003 15:00:10 -0800 (PST) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at (wombat.fafoe.narf.at [192.168.1.42]) by fafoe.narf.at (Postfix) with ESMTP id 11E3740B8; Tue, 25 Nov 2003 00:00:06 +0100 (CET) Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 4F84B1AC; Tue, 25 Nov 2003 00:00:06 +0100 (CET) Date: Tue, 25 Nov 2003 00:00:06 +0100 From: Stefan Farfeleder To: "M. Warner Losh" Message-ID: <20031124230004.GB585@wombat.fafoe.narf.at> Mail-Followup-To: "M. Warner Losh" , boyd@insultant.net, current@freebsd.org References: <20031124174457.GB27782@madman.celabo.org> <03a601c3b2b5$7bc15b80$b9844051@insultant.net> <20031124182322.GB621@wombat.fafoe.narf.at> <20031124.153349.13027396.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031124.153349.13027396.imp@bsdimp.com> User-Agent: Mutt/1.5.5.1i cc: boyd@insultant.net cc: current@freebsd.org Subject: Re: [PATCH] libc_r bug: successful close(2) sets errno to ENOTTY X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2003 23:00:12 -0000 On Mon, Nov 24, 2003 at 03:33:49PM -0700, M. Warner Losh wrote: > In message: <20031124182322.GB621@wombat.fafoe.narf.at> > Stefan Farfeleder writes: > : On Mon, Nov 24, 2003 at 07:05:02PM +0100, boyd, rounin wrote: > : > From: "Jacques A. Vidrine" > : > > The application is broken. You must only check errno if you get an > : > > error indication from the library call. > : > > : > errno is only meaningful after a syscall error. > : > : Wrong, counter-example: strtol(). > > errno is meaningful for syscalls after an error (the original > message). The fact that other functions also dink with errno is not > relevant to that statement. I read boyd's statement as a contradiction to Jacques' one (only after syscall error vs. after library call error). If that's a misinterpretation, I'm sorry. Stefan