Re: add closefrom() call

看板FB_hackers作者時間18年前 (2007/07/24 11:05), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串22/26 (看更多)
Ed Schouten wrote: > * Julian Elischer <julian@elischer.org> wrote: >> Ed Schouten wrote: >>> Wouldn't it be better to just implement it through fcntl() and implement >>> closefrom() in libc? >> that's a possibility but I personally thing the huge difference in >> efficiency >> makes it worth putting it in the kernel. >> Quite a few programs I know of could really help their startup time with >> this as the first thing they do is "close the first 2000 file descriptors. > > Woops! Sorry for responding this late, but it looks like I didn't > explain myself good enough. Sorry. :) To rephrase myself: > > Wouldn't it be better to just implement fcntl(..., F_CLOSEM, ...) in the > kernel and make closefrom() a simple libc routine: > > void > closefrom(int lowfd) > { > fcntl(lowfd, F_CLOSEM, NULL); > } > what on earth would that achieve? (as opposed to just a simple syscall) > Similar to creat(2). > _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #16fMnZ00 (FB_hackers)
討論串 (同標題文章)
文章代碼(AID): #16fMnZ00 (FB_hackers)