From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16728 invoked by alias); 28 Jan 2011 15:49:23 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15737 Received: (qmail 8468 invoked from network); 28 Jan 2011 15:49:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) 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.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110128074915.ZM5855@torch.brasslantern.com> Date: Fri, 28 Jan 2011 07:49:15 -0800 In-reply-to: <20110128144412.GA22306@ypig.lip.ens-lyon.fr> Comments: In reply to Vincent Lefevre "Re: strange behavior" (Jan 28, 3:44pm) References: <20101102120943.GK19295@prunille.vinc17.org> <20101115163234.GE19451@prunille.vinc17.org> <101115092438.ZM29576@torch.brasslantern.com> <20101116031023.GF19451@prunille.vinc17.org> <20110128144412.GA22306@ypig.lip.ens-lyon.fr> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: strange behavior MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 28, 3:44pm, Vincent Lefevre wrote: } Subject: Re: strange behavior } } On 2010-11-16 04:10:23 +0100, Vincent Lefevre wrote: } > On 2010-11-15 09:24:38 -0800, Bart Schaefer wrote: } > > } > > It appears to me that it must be the case that } > > svn "$@" } > > is exiting with status 141, rather than that the filter function is } > > killing its parent with a PIPE signal. } } While the problem described above was not rare, since I modified } the script in the following way (two months ago), I can no longer } see the problem. } } -{ svn "$@"; st=$?; echo "svnwrapper:term" >&2 } 2>>(filter) } +{ } + svn "$@" } + st=$? } + [[ $st -eq 141 ]] && echo "Exit with status 141!" >&2 } + echo "svnwrapper:term" >&2 } +} 2>>(filter) I forget whether we covered this before, but does {svn "$@"} ever fork as part of its execution? There has to be some kind of race condition here. 2>>(filter) runs filter in the background, so if something behind svn also runs as an separate process, it could be possible for the filter to exit and close it's stdin (thereby closing everything else's stdder) before operating-system-level exit-time buffer-flushing has finished. } So, either the problem has been fixed somewhere or it can no longer } be seen due to the change in my script. In the latter case, it is } probably a bug in zsh. I'm going to revert this change and see if } I can see the problem again... Hmm, another thought ... maybe the "zsh: exit 141" is coming from the shell's exit-time handling of the "filter" program, rather than from svn. I've lost enough context here that I don't recall whether that was previously ruled out too.