From owner-freebsd-hackers Fri Jan 26 10:34: 4 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id B93BC37B401 for ; Fri, 26 Jan 2001 10:33:47 -0800 (PST) Received: (from dillon@localhost) by earth.backplane.com (8.11.1/8.9.3) id f0QIXi434137; Fri, 26 Jan 2001 10:33:44 -0800 (PST) (envelope-from dillon) Date: Fri, 26 Jan 2001 10:33:44 -0800 (PST) From: Matt Dillon Message-Id: <200101261833.f0QIXi434137@earth.backplane.com> To: mouss Cc: hackers@FreeBSD.ORG Subject: Re: [kernel patch] fcntl(...) to close many descriptors References: <4.3.0.20010126193228.06e2a200@bluesun> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I think it is worth doing. A quick google search shows that the linux folks discussed the AIX thingy in March 1999, but I don't think they actually implemented. From the discussion, it appears that the fcntl would be useful and (not having seen your patches), almost certainly trivial to implement. -Matt :Hi, : :I've modified the kerenl to add F_CLOSEM functionality to fcntl. :(I've seen this in some AIX docs). : :The purpose is allow a process to close all its filedescriptors starting :from a given value without issuing thousands of close() syscalls. :This may be used for programs that daemonize themselves (or one of :their children) after some amount of work, when many fd's has been :opened. The program would simply call : fcntl(minclose, F_CLOSEM, 0); : :The patch concerns /sys/kern/kern_descriptors.c and fcntl.h :(and of course the corresponding manpage). : :Is this functionality worth inclusion in the kernel (or should I throw :away the patch)? are there any kind souls to review the patch? : :cheers, :mouss To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message