Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: latest from CVS segfaults when FD ulimit is set too low
- X-seq: zsh-workers 27290
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: latest from CVS segfaults when FD ulimit is set too low
- Date: Wed, 23 Sep 2009 20:40:17 +0100
- In-reply-to: <090922064007.ZM5883@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <87iqfgwplu.fsf@xxxxxxxxxxxx> <20090921214528.7c7b412c@pws-pc> <20090922100019.3c302758@news01> <090922064007.ZM5883@xxxxxxxxxxxxxxxxxxxxxx>
On Tue, 22 Sep 2009 06:40:07 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Perhaps instead of an unconditional close, movefd() should do
>
> if (fe != -1 || fd > 2)
> zclose(fd);
>
> so we never actually lose stdin/out/err but other leaks are plugged.
I think that does make sense, in the context of calls that aren't fully
error-checked. The worst that's likely to happen is that if a user
deliberately closed 0, 1, or 2 we'll get an unwanted fd there. In
return 0, 1, or 2 won't be accidentally closed.
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author