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

Re: bug with eval, proc-subst and pipes



2013-07-20 18:11:44 +0100, Peter Stephenson:
> On Fri, 19 Jul 2013 21:58:53 +0100
> Stephane Chazelas <stephane.chazelas@xxxxxxxxx> wrote:
> > and fd 13 by closedumps() (the missing link to compinit?).
> 
> That's distinctly suspicious, if 13 was opened for the process
> substitution.
> 
> Does the following fix it, or is there yet more?
> 
> If it does we still have an error for older systems, but I suspect
> FD_CLOEXEC (and O_CLOEXEC) are widely enough supported that may be more
> a theoretical then an actual problem.
[...]

It's better:

$ eval 'ls -l <(echo 1) <(echo 2) <(echo 3) <(echo 4)' | cat
ls: cannot access /proc/self/fd/11: No such file or directory
lr-x------ 1 chazelas chazelas 64 Jul 20 21:23 /proc/self/fd/10 -> pipe:[1541173]
lr-x------ 1 chazelas chazelas 64 Jul 20 21:23 /proc/self/fd/12 -> pipe:[1541175]
lr-x------ 1 chazelas chazelas 64 Jul 20 21:23 /proc/self/fd/13 -> pipe:[1541176]

Only one now instead of two.

-- 
Stephane



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