zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: unlimited file descripters causes problems for zsh-4.0.2
Date: Fri, 19 Oct 2001 17:56:44 +0000	[thread overview]
Message-ID: <1011019175644.ZM9169@candle.brasslantern.com> (raw)
In-Reply-To: <1011019164041.ZM8348@candle.brasslantern.com>

On Oct 19,  4:40pm, Bart Schaefer wrote:
}
} What I'm more concerned about is closeallelse() in exec.c, which is going
} to make up to several billion close() calls (plus a lot of unnecessary
} looping) every time a process with a redirection is started; but which I
} think could be caused to leak descriptors if it doesn't scan all the way
} to the actual maximum fd.

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.  (We still use a constant on the order of 1024 for fdtable_size.)
Thereafter zsh itself is in control of the descriptor numbers, so we
should never have to scan beyond that number again, so we use that global
in closeallelse() instead of calling zopenmax() again.

-- 
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   


  reply	other threads:[~2001-10-19 17:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-18 23:44 Matthew Braun
2001-10-19 16:40 ` Bart Schaefer
2001-10-19 17:56   ` Bart Schaefer [this message]
2001-10-21 19:07     ` Bart Schaefer
2001-10-21 20:17       ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1011019175644.ZM9169@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).