From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18742 invoked from network); 21 Oct 2001 20:57:52 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 21 Oct 2001 20:57:52 -0000 Received: (qmail 6947 invoked by alias); 21 Oct 2001 20:57:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16096 Received: (qmail 6929 invoked from network); 21 Oct 2001 20:57:45 -0000 From: Bart Schaefer Message-Id: <1011021201717.ZM15041@candle.brasslantern.com> Date: Sun, 21 Oct 2001 20:17:17 +0000 In-Reply-To: <1011021190727.ZM14572@candle.brasslantern.com> Comments: In reply to Bart Schaefer "Re: unlimited file descripters causes problems for zsh-4.0.2" (Oct 21, 7:07pm) References: <200110182344.TAA12655@sassy.aa.ops.us.uu.net> <1011019164041.ZM8348@candle.brasslantern.com> <1011019175644.ZM9169@candle.brasslantern.com> <1011021190727.ZM14572@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: unlimited file descripters causes problems for zsh-4.0.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 21, 7:07pm, Bart Schaefer wrote: } } } Here's a suggestion: Once, at startup, we scan all the way to zopenmax() } } looking for open descriptors, and set a global to the largest number we } } find. I should point out that it's possible for sysconf(_SC_OPEN_MAX) to return zero even when the actual descriptor limit is greater than OPEN_MAX. So there is still potential for zsh to leave high-numbered descriptors open in closeallelse() et al., should the OS have a particularly brain-damaged POSIX implementation and someone really wishes to force it. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net