Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 18 Mar 2003 09:33:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 18 Mar 2003 09:33:43 -0500 Received: from [66.70.28.20] ([66.70.28.20]:35076 "EHLO maggie.piensasolutions.com") by vger.kernel.org with ESMTP id ; Tue, 18 Mar 2003 09:33:41 -0500 Date: Tue, 18 Mar 2003 15:46:32 +0100 From: DervishD To: "Richard B. Johnson" Cc: "Sparks, Jamie" , Linux kernel Subject: Re: select() stress Message-ID: <20030318144632.GB1438@DervishD> References: <20030318102837.GH42@DervishD> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4i Organization: Pleyades User-Agent: Mutt/1.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1088 Lines: 27 Hi Richard, again :) In my last message I told you that getdtablesize() is not reliable for closing all file descriptors, that its return value is not necessarily related to the file descriptor index. Well, I forgot to say that getdtablehi() effectively returns the index for the largest file descriptor available to the process plus one, that is, perfect for using with 'select()' and for closing all open files: for(i=0; i