Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jul 1999 10:12:17 +0000
From:      Niall Smart <niall@pobox.com>
To:        Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Proposal for new syscall to close files
Message-ID:  <37959D01.D849ABED@pobox.com>
References:  <99Jul21.100128est.40397@border.alcanet.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help

> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37959D01.D849ABED>