From owner-cvs-all Fri Apr 19 8:33:22 2002 Delivered-To: cvs-all@freebsd.org Received: from gw.nectar.cc (gw.nectar.cc [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id D8EFC37B41F; Fri, 19 Apr 2002 08:33:13 -0700 (PDT) Received: from madman.nectar.cc (madman.nectar.cc [10.0.1.111]) by gw.nectar.cc (Postfix) with ESMTP id 5C8F438; Fri, 19 Apr 2002 10:33:13 -0500 (CDT) Received: from madman.nectar.cc (localhost [IPv6:::1]) by madman.nectar.cc (8.12.2/8.11.6) with ESMTP id g3JFXDVw032051; Fri, 19 Apr 2002 10:33:13 -0500 (CDT) (envelope-from nectar@madman.nectar.cc) Received: (from nectar@localhost) by madman.nectar.cc (8.12.2/8.12.2/Submit) id g3JFXADI032050; Fri, 19 Apr 2002 10:33:10 -0500 (CDT) Date: Fri, 19 Apr 2002 10:33:10 -0500 From: "Jacques A. Vidrine" To: Brian Somers Cc: Robert Watson , Garrett Wollman , "M. Warner Losh" , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_descrip.c kern_exec.c src/sys/sys filedesc.h Message-ID: <20020419153310.GD31829@madman.nectar.cc> Mail-Followup-To: "Jacques A. Vidrine" , Brian Somers , Robert Watson , Garrett Wollman , "M. Warner Losh" , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org References: <200204191445.g3JEjXSg095842@hak.lan.Awfulhak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200204191445.g3JEjXSg095842@hak.lan.Awfulhak.org> User-Agent: Mutt/1.3.28i X-Url: http://www.nectar.cc/ Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Apr 19, 2002 at 03:45:33PM +0100, Brian Somers wrote: > The spec is dup(2). It's not documented in open(2), but people make > the assumption. It's not just an assumption. Stevens's APUE p49, in the description of `open': ``The file descriptor returned by open is guaranteed to be the lowest numbered unused descriptor.'' McKusick, et. al.'s daemon book, p34: ``The open, pipe, and socket system calls produce new descriptors with the lowest unused number usable for a descriptor.'' ISO/IEC 9945-1: 1996 ANSI/IEEE Std 1003.1, 1996 Edition, section 5.3.1.2: ``The open() function shall return a file descriptor for the named file that is the lowest file descriptor not currently open for that process.'' IEEE Std 1003.1-2001: ``The open() function shall return a file descriptor for the named file that is the lowest file descriptor not currently open for that process.'' et cetera -- Jacques A. Vidrine http://www.nectar.cc/ NTT/Verio SME . FreeBSD UNIX . Heimdal Kerberos jvidrine@verio.net . nectar@FreeBSD.org . nectar@kth.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message