From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 6 11:23:47 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2161A16A421 for ; Fri, 6 Jul 2007 11:23:47 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [83.98.131.211]) by mx1.freebsd.org (Postfix) with ESMTP id D3F9113C45D for ; Fri, 6 Jul 2007 11:23:46 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id AA6DE1CC8A; Fri, 6 Jul 2007 13:25:24 +0200 (CEST) Date: Fri, 6 Jul 2007 13:25:24 +0200 From: Ed Schouten To: d@delphij.net Message-ID: <20070706112453.GA3217@hoeg.nl> References: <20070705122650.GE1302@britannica.bec.de> <468E16E6.6030608@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MW5yreqqjyrRcusr" Content-Disposition: inline In-Reply-To: <468E16E6.6030608@delphij.net> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: FreeBSD Hackers , Robert Watson Subject: Re: add closefrom() call X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2007 11:23:47 -0000 --MW5yreqqjyrRcusr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * LI Xin wrote: > Here is my implementation for FreeBSD. Some difference between my and > DragonFly's implementation: >=20 > - closefrom(-1) would be no-op on DragonFly, my version would close all > open files (From my understanding of OpenSolaris's userland > implementation, this is Solaris's behavior). > - my version closefrom(very_big_fd) would result in EBADF. I am not > very sure whether this is correct, but it does not hurt for applications > that thinks closefrom() would return void. Wouldn't it be better to just implement it through fcntl() and implement closefrom() in libc? --=20 Ed Schouten WWW: http://g-rave.nl/ --MW5yreqqjyrRcusr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGjiak52SDGA2eCwURAo3bAJ47S3erS6vgzHwl9RYhdOcqsgdwYQCeKsVK +EFboD/35CVD/ayTO145qVE= =336X -----END PGP SIGNATURE----- --MW5yreqqjyrRcusr--