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

Re: bug with eval, proc-subst and pipes



On Thu, 18 Jul 2013 09:57:41 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> Will it be good enough to go through all process substitution output
> file descriptors for a job when we enter zwaitjob() and close them?  I
> think at that point nothing more can write from the main shell process,
> and subprocesses in any case have to manage their own copies of the file
> descriptor.

Thinking about it, it would presumably be safe just to close all
temporary file descriptors at that point, including input, since there's
nothing in the job that can read input now, either.  So there's no need
to distinguish input and output.  We keep the existing close logic as a
backup.  I don't think it's safe to delete temporary files yet, however,
since unlike the file descriptors, which are local to the process, those
can be accessed directly by subprocesses still running.

pws



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