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

Re: Fwd (potential regression in 5.0.3): Bug#732726: zsh function freeze



On Jan 2,  6:06pm, Peter Stephenson wrote:
} Subject: Re: Fwd (potential regression in 5.0.3): Bug#732726: zsh function
}
} It looks like it was either a good or a bad time for me to be away,
} depending whether you're me or Bart.

I was at home with a few days off, so it really wasn't a problem.

} If there's nothing to indicate otherwise over the next couple of days
} I'll make a 5.0.5 with the fixes in at the weekend.

There was one thing I left for your attention: Carl's patch in 32196 for
copy-prev-shell-word.


} > } So I think we need to salvage the filelist from the job table and remove
} > } the pipe file descriptors in the danger cases, which I take to be the
} > } places where we were handling subsh_close in the old version of the code
} > } (where we are handling nested shell constructs of some sort).
[...]
} > What concerns me is whether we might be closing too many file descriptors
} > if we remove all is_fd entries from filelist at that point
} 
} Yes, I don't think there should be too much problem with what we *are*
} doing, and the regression test seems fine.

Is it only pipes in that filelist?  I was concerned that there might be
descriptors for real files there, that shouldn't be closed.  But again I
think it's OK because in that context all the shell is going to do is
wait.
 
} I wonder if we should be closing even more in the subshell (only);
} should we, in fact, be closing all f.d.s associated with pipes now
} that we're no longer in a shell that has any interest in them?

Probably yes, which might in fact fix some of the nits with coprocs
(though zsh's coproc doesn't seem to have any nits of that particular
flavor that e.g. ksh's does not also have).  To do that I think we'd
need to start keeping track of what kind of fd is in the filelist,
and whether it's read or write, not just that it's a descriptor
associated with a particular job.

} Or doesn't this actually cause a problem in practice?

As you pointed out, we're doing better now than we were, and even the
old way it hasn't been especially noticable for many years so far.



Messages sorted by: Reverse Date, Date, Thread, Author