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

Re: bug with named pipes and process substitution



Hi,

Thanks a lot for the quick resolution, I tested the patch and it works
for me too. However, the test added works fine even on the master
branch without the patch (I included the mkpipe -> mkfifo change). Not
sure if I'm doing something wrong but I'm sending the test I used to
find the broken commit in case there is a problem with the current
test:

diff --git a/Test/D03procsubst.ztst b/Test/D03procsubst.ztst
index 7b87589..757ac49 100644
--- a/Test/D03procsubst.ztst
+++ b/Test/D03procsubst.ztst
@@ -126,3 +126,15 @@
   eval 'foo here is some output)'
 0:full alias expanded when substitution starts in alias
 >here is some output
+
+  if ! (mkfifo test_pipe >/dev/null 2>&1); then
+    ZTST_skip="mkfifo not available"
+  else
+    echo 1 | tee >(cat > test_pipe) | cat - test_pipe > /dev/null &
+    sleep 1
+    if [ ! -d /proc/$! ]; then
+      echo success
+    fi
+  fi
+0:proc subst fd in forked subshell closed in parent
+>success



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