From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1185 invoked by alias); 21 Dec 2013 02:19:54 -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: 32170 Received: (qmail 27741 invoked from network); 21 Dec 2013 02:19:47 -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: <131220181950.ZM15385@torch.brasslantern.com> Date: Fri, 20 Dec 2013 18:19:50 -0800 In-reply-to: <20131221001235.GC21721@xvii.vinc17.org> Comments: In reply to Vincent Lefevre "Re: Fwd (potential regression in 5.0.3): Bug#732726: zsh function freeze" (Dec 21, 1:12am) 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> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Vincent Lefevre , 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 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.