From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@sunsite.dk
Subject: Re: latest from CVS segfaults when FD ulimit is set too low
Date: Wed, 23 Sep 2009 20:40:17 +0100 [thread overview]
Message-ID: <20090923204017.3c27a8eb@pws-pc> (raw)
In-Reply-To: <090922064007.ZM5883@torch.brasslantern.com>
On Tue, 22 Sep 2009 06:40:07 -0700
Bart Schaefer <schaefer@brasslantern.com> 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@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
next prev parent reply other threads:[~2009-09-23 19:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 9:48 Jim Meyering
2009-09-21 20:45 ` Peter Stephenson
2009-09-22 9:00 ` Peter Stephenson
2009-09-22 13:40 ` Bart Schaefer
2009-09-23 19:40 ` Peter Stephenson [this message]
2009-09-22 15:35 ` Wayne Davison
2009-09-22 15:39 ` Peter Stephenson
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=20090923204017.3c27a8eb@pws-pc \
--to=p.w.stephenson@ntlworld.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).