From owner-freebsd-current@FreeBSD.ORG Tue Nov 25 02:13:14 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 CD25D16A4CE for ; Tue, 25 Nov 2003 02:13:14 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 832F343FD7 for ; Tue, 25 Nov 2003 02:13:13 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.10/8.12.10) with ESMTP id hAPADADx034475; Tue, 25 Nov 2003 11:13:11 +0100 (CET) (envelope-from phk@phk.freebsd.dk) To: "boyd, rounin" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 25 Nov 2003 11:04:30 +0100." <004b01c3b33b$873a67a0$b9844051@insultant.net> Date: Tue, 25 Nov 2003 11:13:10 +0100 Message-ID: <34474.1069755190@critter.freebsd.dk> 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: Tue, 25 Nov 2003 10:13:14 -0000 In message <004b01c3b33b$873a67a0$b9844051@insultant.net>, "boyd, rounin" write s: >From: "Stefan Farfeleder" >> > 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). > >some libc functions do mangle errno, but only after an error. > >in my terse statement the intention was to affirm that errno is >meaningless unless an error has ocurred (a syscall being the >simplest case, while random other libc calls may behave in >the same way). Errno is undefined unless the relevant manual page states otherwise. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.