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. > > diff --git a/Src/jobs.c b/Src/jobs.c [...] Not better with that one (on top of the other one). ~$ 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] Though I've also seen (with one zsh invocation consistently but no other one): ~$ 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/12: 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:51 /proc/self/fd/10 -> pipe:[504591] Attached is the strace output (for the first case). See how fd 13 is closed in the process that execs ls and fd 11 in its parent shortly before the fork. I verified that I can reproduce it from a fresh debootstrap of debian sid amd64, so it should be easily reproduced from a Debian-based system like ubuntu or ubuntu live CD. Procedure: sudo debootstrap --arch amd64 sid debian http://ftp.uk.debian.org/debian cd debian sudo mount --bind /dev dev sudo mount -t proc p proc sudo mount -t sysfs s sys sudo mount -t devpts d dev/pts chroot . bash apt-get install zsh zsh autoload compinit compinit eval 'ls -l <(echo 1) <(echo 2) <(echo 3) <(echo 4)' | cat From the config.status of the debian package build: ac_cs_config="'--build=x86_64-linux-gnu' '--includedir=\${prefix}/include' '--mandir=\${prefix}/share/man' '--infodir=\${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libdir=\${prefix}/lib/x86_64-linux-gnu' '--libexecdir=\${prefix}/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--disable-dependency-tracking' '--prefix=/usr' '--mandir=/usr/share/man' '--bindir=/bin' 'LDFLAGS=-Wl,--as-needed -g -Wl,-z,relro' '--infodir=/usr/share/info' '--enable-maildir-support' '--enable-max-jobtable-size=256' '--enable-etcdir=/etc/zsh' '--enable-function-subdirs' '--enable-site-fndir=/usr/local/share/zsh/site-functions' '--enable-fndir=/usr/share/zsh/functions' '--with-tcsetpgrp' '--with-term-lib=ncursesw tinfo' '--enable-cap' '--enable-pcre' '--enable-readnullcmd=pager' '--enable-custom-patchlevel=Debian' '--enable-additional-fpath=/usr/share/zsh/vendor-functions,/usr/share/zsh/vendor-completions' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -g' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'" -- Stephane