Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: unlimited file descripters causes problems for zsh-4.0.2
- X-seq: zsh-workers 16088
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: unlimited file descripters causes problems for zsh-4.0.2
- Date: Fri, 19 Oct 2001 17:56:44 +0000
- In-reply-to: <1011019164041.ZM8348@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200110182344.TAA12655@xxxxxxxxxxxxxxxxxxxxxx> <1011019164041.ZM8348@xxxxxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author