about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-10-04 21:08:56 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-10-04 21:08:56 -0700
commita65fb0677c6188220bf5ceacdb8d9a1a2f24883f (patch)
tree696ffd9f11e9e83b5d73d93acf27f93f77363403 /Test
parent74e26bf1262c921c691ee0451ced99aa4eb8aefa (diff)
downloadzsh-a65fb0677c6188220bf5ceacdb8d9a1a2f24883f.tar.gz
zsh-a65fb0677c6188220bf5ceacdb8d9a1a2f24883f.tar.xz
zsh-a65fb0677c6188220bf5ceacdb8d9a1a2f24883f.zip
33354: when backgrounding a pipeline, close all pipe descriptors in the parent
Add test for both this and 33345+33346
Diffstat (limited to 'Test')
-rw-r--r--Test/A05execution.ztst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index 8d256ff84..ca97f4f41 100644
--- a/Test/A05execution.ztst
+++ b/Test/A05execution.ztst
@@ -217,6 +217,21 @@ F:This similar test was triggering a reproducible failure with pipestatus.
 F:This test checks for a file descriptor leak that could cause the left
 F:side of a pipe to block on write after the right side has exited
 
+  { setopt MONITOR } 2>/dev/null
+  if [[ -o MONITOR ]]
+  then
+   ( while :; do print "This is a line"; done ) | () : &
+   sleep 1
+   jobs -l
+  else
+   print -u $ZTST_fd "Skipping pipe leak test, requires MONITOR option"
+   print "[0] 0 0"
+  fi
+0:Bug regression: piping to anonymous function; piping to backround function
+*>\[<->\] <-> <->
+F:This test checks for two different bugs, a parser segfault piping to an
+F:anonymous function, and a descriptor leak when backgrounding a pipeline
+
   print "autoload_redir() { print Autoloaded ksh style; } >autoload.log" >autoload_redir
   autoload -Uk autoload_redir
   autoload_redir