Re: add closefrom() call

看板FB_hackers作者時間18年前 (2007/07/24 10:54), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/26 (看更多)
--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--
文章代碼(AID): #16fMdY00 (FB_hackers)
討論串 (同標題文章)
文章代碼(AID): #16fMdY00 (FB_hackers)