Re: add closefrom() call
--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--
討論串 (同標題文章)
完整討論串 (本文為第 4 之 26 篇):