From owner-freebsd-hackers Wed Jul 21 1:17:49 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from relay01.indigo.ie (relay01.indigo.ie [194.125.133.225]) by hub.freebsd.org (Postfix) with SMTP id 28EA615469 for ; Wed, 21 Jul 1999 01:17:45 -0700 (PDT) (envelope-from niall@pobox.com) Received: (qmail 23938 messnum 238378 invoked from network[194.125.207.54/ts99-045.dublin.indigo.ie]); 21 Jul 1999 08:16:25 -0000 Received: from ts99-045.dublin.indigo.ie (HELO pobox.com) (194.125.207.54) by relay01.indigo.ie (qp 23938) with SMTP; 21 Jul 1999 08:16:25 -0000 Message-ID: <37959D01.D849ABED@pobox.com> Date: Wed, 21 Jul 1999 10:12:17 +0000 From: Niall Smart X-Mailer: Mozilla 4.6 [en] (X11; I; FreeBSD 3.2-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Peter Jeremy Cc: hackers@FreeBSD.ORG Subject: Re: Proposal for new syscall to close files References: <99Jul21.100128est.40397@border.alcanet.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 3) Close all FDs except the ones you explicitly want to keep. This > is normally something like: > for (i = getdtablesize(); --i > 2; ) > close(i); > The advantage is that you are sure you don't miss any. The > disadvantage is that it requires a system call for each potentially > open FD - >600 on my system - whereas maybe only 4 or 5 are > actually open. How many daemons suffer from performance problems because of this? None that I know of. I'm sorry, but this syscall seems like clutter to me. Regards, Niall To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message