zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Vincent Lefevre <vincent@vinc17.net>, zsh-workers@zsh.org
Subject: Re: Fwd (potential regression in 5.0.3): Bug#732726: zsh function freeze
Date: Fri, 20 Dec 2013 18:19:50 -0800	[thread overview]
Message-ID: <131220181950.ZM15385@torch.brasslantern.com> (raw)
In-Reply-To: <20131221001235.GC21721@xvii.vinc17.org>

On Dec 21,  1:12am, Vincent Lefevre wrote:
} Subject: Re: Fwd (potential regression in 5.0.3): Bug#732726: zsh function
}
} A better example:
} 
} foo() { printf "%d\n" {1..20000} }

Actually the "ls -R /" example was better because it ruled out problems
with SIGPIPE handling and the "print" builtin.

This has to be result of either

+       * 31549: Src/exec,c, Src/zsh.h: replace ad-hoc subsh_close file
+       descriptor for pipes with new addfilelist() job-based mechanism.

(which is the tail of a whole thread starting with 31528) or else it's

+       * 31919: Src/exec.c, Src/init.c: fix deadlock when a shell builtin
+       with a multio redirection is used on the left side of a pipeline,
+       by making sure stdin/out/err file descriptors are closed for the
+       multio copy process, which means not re-using those descriptors
+       after they are closed and marked FDT_UNUSED in fdtable[].  For
+       completeness, initialize their fdtable[] state to FDT_EXTERNAL.

because the problem is that the parent shell still holds open the file
descriptor that is the standard output of the shell function, so the
write is blocked rather than getting SIGPIPE or other failure.


  reply	other threads:[~2013-12-21  2:19 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 [this message]
2013-12-21  3:42           ` Bart Schaefer
2013-12-21  7:16             ` Bart Schaefer
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=131220181950.ZM15385@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=vincent@vinc17.net \
    --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).