From owner-freebsd-hackers Fri Jan 26 10:20:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.nettoll.com (matrix.nettoll.net [212.155.143.61]) by hub.freebsd.org (Postfix) with ESMTP id C2E6E37B402 for ; Fri, 26 Jan 2001 10:20:18 -0800 (PST) Received: by smtp.nettoll.com; Fri, 26 Jan 2001 19:19:14 +0100 (MET) Message-Id: <4.3.0.20010126193228.06e2a200@bluesun> X-Sender: usebsd@pop.free.fr X-Mailer: QUALCOMM Windows Eudora Version 4.3 Date: Fri, 26 Jan 2001 19:32:34 +0100 To: hackers@FreeBSD.ORG From: mouss Subject: [kernel patch] fcntl(...) to close many descriptors Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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