Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jul 2007 13:25:24 +0200
From:      Ed Schouten <ed@fxq.nl>
To:        d@delphij.net
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>, Robert Watson <rwatson@FreeBSD.org>
Subject:   Re: add closefrom() call
Message-ID:  <20070706112453.GA3217@hoeg.nl>
In-Reply-To: <468E16E6.6030608@delphij.net>
References:  <de5dfb5a0707041727j3e3518f9l5a019717a9f90aa@mail.gmail.com> <20070705122650.GE1302@britannica.bec.de> <468E16E6.6030608@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--MW5yreqqjyrRcusr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* LI Xin <delphij@delphij.net> 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 <ed@fxq.nl>
 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070706112453.GA3217>