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

Re: Fwd (potential regression in 5.0.3): Bug#732726: zsh function freeze

On Dec 20,  7:42pm, Bart Schaefer wrote:
} The problem is that pipes[0] isn't always added to the list of files
} for the job; sometimes it really does need to be closed there.

Here's a regression test.  I assume it's OK to do this coproc trick,
since if it were not tests A01 and A04 would already have failed.

I verified that this test *fails* with 5.0.3 and 5.0.4 (sigh).

diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index c8320a1..61d24fe 100644
--- a/Test/A05execution.ztst
+++ b/Test/A05execution.ztst
@@ -202,3 +202,15 @@ F:the bug is still there or it reappeared. See workers-29973 for details.
 0:Check $pipestatus with a known difficult case
 >1 0 1 0 0
 F:This similar test was triggering a reproducible failure with pipestatus.
+  { unsetopt MONITOR } 2>/dev/null
+  coproc { read -Et 5 || kill -INT $$ }
+  print -u $ZTST_fd 'This test takes 5 seconds to fail...'
+  { printf "%d\n" {1..20000} } | ( read -E )
+  print -p done
+  read -Ep
+0:Bug regression: piping a shell construct to an external process may hang
+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

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