From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 983 invoked by alias); 26 Oct 2014 19:01:16 -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: 33542 Received: (qmail 19108 invoked from network); 26 Oct 2014 19:01: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 X-Originating-IP: [80.3.229.105] X-Spam: 0 X-Authority: v=2.1 cv=N7qnFgNB c=1 sm=1 tr=0 a=uz1KDxDNIq33yePw376BBA==:117 a=uz1KDxDNIq33yePw376BBA==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=GPJEeNCi87r-oYjcyUwA:9 a=CjuIK1q_8ugA:10 Date: Sun, 26 Oct 2014 19:01:08 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: bug in zsh wait builtin - rhbz#1150541 Message-ID: <20141026190108.639ecd1c@pws-pc.ntlworld.com> In-Reply-To: <20141026001717.4d4e3f5a@pws-pc.ntlworld.com> References: <20141021210234.199eee3d@pws-pc.ntlworld.com> <141021235542.ZM14840@torch.brasslantern.com> <20141023093232.1f4201e2@pwslap01u.europe.root.pri> <141023215041.ZM19768@torch.brasslantern.com> <20141025200847.782316a4@pws-pc.ntlworld.com> <141025152827.ZM7060@torch.brasslantern.com> <141025153231.ZM19285@torch.brasslantern.com> <20141026000448.12fa03fd@pws-pc.ntlworld.com> <20141026001717.4d4e3f5a@pws-pc.ntlworld.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Here's a test. The tortuous explanation points out that we don't absolutely guarantee on every run of the test that it's testing the feature in question, but statistically it will be tested more often than not. So Axel will spot failures even if no one else does :-). The changes in quotes earlier are just to deconfuse Emacs shell mode. > Word not found in the Dictionary and Encyclopedia. So what is the opposite of confuse? pws diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst index ca97f4f..838cd74 100644 --- a/Test/A05execution.ztst +++ b/Test/A05execution.ztst @@ -190,9 +190,9 @@ print "${pipestatus[@]}") ZTST_hashmark done | sort | uniq -c | sed 's/^ *//' -0:Check whether `$pipestatus[]' behaves. +0:Check whether '$pipestatus[]' behaves. >2048 2 1 0 -F:This test checks for a bug in `$pipestatus[]' handling. If it breaks then +F:This test checks for a bug in '$pipestatus[]' handling. If it breaks then F:the bug is still there or it reappeared. See workers-29973 for details. { setopt MONITOR } 2>/dev/null @@ -244,3 +244,29 @@ F:anonymous function, and a descriptor leak when backgrounding a pipeline >autoload_redir () { > print Autoloaded ksh style >} > autoload.log + +# This tests that we record the status of processes that have already exited +# for when we wait for them. +# +# Actually, we don't guarantee here that the jobs have already exited, but +# the order of the waits means it's highly likely we do need to a recall +# previous status, barring accidents which shouldn't happen very often. In +# other words, we relying on the test working repeatedly rather than just +# once. The monitor option is irrelevant to the logic, so we'll make +# our job easier by turning it off. + unsetopt monitor + (exit 1) & + one=$! + (exit 2) & + two=$! + (exit 3) & + three=$! + wait $three + print $? + wait $two + print $? + wait $one +1:The status of recently exited background jobs is recorded +>3 +>2 +