From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6687 invoked by alias); 21 Dec 2013 07:16:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32172 Received: (qmail 12897 invoked from network); 21 Dec 2013 07:16:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <131220231616.ZM20378@torch.brasslantern.com> Date: Fri, 20 Dec 2013 23:16:16 -0800 In-reply-to: <131220194223.ZM29152@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: Fwd (potential regression in 5.0.3): Bug#732726: zsh function freeze" (Dec 20, 7:42pm) References: <20131220192435.GE27889@sym.noone.org> <131220122701.ZM15525@torch.brasslantern.com> <20131220235149.GA21721@xvii.vinc17.org> <20131220235955.GB21721@xvii.vinc17.org> <20131221001235.GC21721@xvii.vinc17.org> <131220181950.ZM15385@torch.brasslantern.com> <131220194223.ZM29152@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Fwd (potential regression in 5.0.3): Bug#732726: zsh function freeze MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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 +>1 +>done +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