Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: latest from CVS segfaults when FD ulimit is set too low



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