zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Fwd (potential regression in 5.0.3): Bug#732726: zsh function freeze
Date: Fri, 20 Dec 2013 23:16:16 -0800	[thread overview]
Message-ID: <131220231616.ZM20378@torch.brasslantern.com> (raw)
In-Reply-To: <131220194223.ZM29152@torch.brasslantern.com>

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


  reply	other threads:[~2013-12-21  7:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20 19:24 Axel Beckert
2013-12-20 20:27 ` Bart Schaefer
2013-12-20 20:49   ` Axel Beckert
2013-12-20 23:51   ` Vincent Lefevre
2013-12-20 23:59     ` Vincent Lefevre
2013-12-21  0:12       ` Vincent Lefevre
2013-12-21  2:19         ` Bart Schaefer
2013-12-21  3:42           ` Bart Schaefer
2013-12-21  7:16             ` Bart Schaefer [this message]
2013-12-21 18:08             ` Peter Stephenson
2013-12-21 20:57               ` Bart Schaefer
2013-12-21 22:34                 ` Peter Stephenson
2013-12-22  1:34                   ` Bart Schaefer
2013-12-23  2:06                     ` (potential regression in 5.0.3) Paul Ackersviller
2013-12-23  5:47                       ` Bart Schaefer
2014-01-02 18:06                     ` Fwd (potential regression in 5.0.3): Bug#732726: zsh function freeze Peter Stephenson
2014-01-02 20:40                       ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=131220231616.ZM20378@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).