add closefrom() call
Ighighi
ighighi at gmail.com
Tue Jul 10 03:46:34 UTC 2007
>Date: Mon, 09 Jul 2007 15:00:21 +0800
>From: LI Xin <delphij at delphij.net <mailto:delphij at delphij.net>>
>Subject: Re: add closefrom() call
>To: Robert Watson <rwatson at FreeBSD.org <mailto:rwatson at FreeBSD.org>>
>Cc: FreeBSD Hackers <freebsd-hackers at freebsd.org
<mailto:freebsd-hackers at freebsd.org>>, d at delphij.net <mailto:d at delphij.net>,
Julian Elischer <julian at elischer.org
<mailto:julian at elischer.org>>, Ed Schouten <ed at fxq.nl <mailto:ed at fxq.nl>>
>Message-ID: <4691DD05.2090407 at delphij.net
<mailto:4691DD05.2090407 at delphij.net>>
>Content-Type: text/plain; charset="iso-8859-1"
LI Xin wrote:
>Nope.
>
>I will try to see if we have some way to expose lastfile to userland, or
>whether we have some better approach to implement this in userland next
>week if I would have some spare time...
F_MAXFD is easy to implement... Attached is a diff that should work for
CURRENT.
I'm working on a 6-STABLE.
See closefrom.c for an implementation based on F_MAXFD.
Still, it doesn't pay to implement it this way...
Calling F_MAXFD everytime we close a file descriptor would be heavy
having too much fd's.
On the other hand, it wouldn't make much a difference to just start from
getdtablesize() - 1.
>Cheers,
>--
>Xin LI <delphij at delphij.net <mailto:delphij at delphij.net>>
http://www.delphij.net/
>FreeBSD - The Power to Serve!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: maxfd.diff
Type: text/x-patch
Size: 822 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070710/2a2bd8e4/maxfd.bin
More information about the freebsd-hackers
mailing list