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

Re: bug with eval, proc-subst and pipes



2013-07-19 14:36:07 -0700, Bart Schaefer:
> On Friday, July 19, 2013, Stephane Chazelas wrote:
> 
> > 2013-07-18 12:32:10 +0100, Peter Stephenson:
> > [...]
> > > Apparently working (except for the fact it doesn't fix Stephane's
> > > original problem, don't know if we're any further forward with that).
> > > However, I'll wait in case Bart can see something I missed.
> 
> 
> For some reason I never received that message from Peter.  Did it perhaps
> go privately to Stephen?

http://thread.gmane.org/gmane.comp.shells.zsh.devel/26797/focus=26823

> ~$ eval 'ls -l <(echo 1) <(echo 2) <(echo 3) <(echo 4)' | cat
> > ls: cannot access /proc/self/fd/11: No such file or directory
> > ls: cannot access /proc/self/fd/13: No such file or directory
> > lr-x------ 1 chazelas chazelas 64 Jul 19 20:52 /proc/self/fd/10 ->
> > pipe:[509333]
> > lr-x------ 1 chazelas chazelas 64 Jul 19 20:52 /proc/self/fd/12 ->
> > pipe:[509335]
> 
> 
> Ok, this is kinda strange, because on my Ubuntu system there is no
> /proc/self/fd ... The "ls" shows /dev/fd files.  Why would that be
> different?

>From config.log:

configure:10381: checking for /dev/fd filesystem
configure:10394: result: /proc/self/fd

> 
> And it's further odd that some of the descriptors are closed but not all of
> them.
> 
> 
> > [In strace]
> >
> > See how fd 13 is closed in the process that execs ls and fd 11
> > in its parent shortly before the fork.
> 
> 
> That's also odd.  It would almost seem to imply that those descriptors got
> the close-on-exec flag set somehow.

If you look at my other email
(http://thread.gmane.org/gmane.comp.shells.zsh.devel/26797/focus=26823).
Those fds are closed because they are taken for something else
(I suppose because they had been closed before already and
reassigned).

-- 
Stephane



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