about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-07-23 09:34:11 +0100
committerPeter Stephenson <pws@zsh.org>2015-07-23 09:34:11 +0100
commit28a962f557952a6001d37f4f4f7034361d11bf89 (patch)
tree619000f12f12992f4521e99c05d170b235e6bfb2 /Test
parent49ff2e00dc3787b3575f392f53d90774f1dbbdce (diff)
downloadzsh-28a962f557952a6001d37f4f4f7034361d11bf89.tar.gz
zsh-28a962f557952a6001d37f4f4f7034361d11bf89.tar.xz
zsh-28a962f557952a6001d37f4f4f7034361d11bf89.zip
35849: close fd's from process substitution after fork
Leaving these hanging in parent could cause deadlock: test added.
Diffstat (limited to 'Test')
-rw-r--r--Test/D03procsubst.ztst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Test/D03procsubst.ztst b/Test/D03procsubst.ztst
index 7b8758901..9ab67c2b4 100644
--- a/Test/D03procsubst.ztst
+++ b/Test/D03procsubst.ztst
@@ -126,3 +126,18 @@
   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) | (){
+      local pipein
+      read pipein <test_pipe
+      print $pipein
+      read pipein
+      print $pipein
+    }
+  fi
+0:proc subst fd in forked subshell closed in parent
+>1
+>1