From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22474 invoked by alias); 21 Oct 2014 07:53:51 -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: 33482 Received: (qmail 398 invoked from network); 21 Oct 2014 07:53:37 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=WZsm3rnQf6KttrsjkXzxkwLpXUZn59K3HapVti9h1aQ=; b=tUPloMVITHcmkMTy/e0D1E3eLW7CJhId8TcvOeGsrSedpHOQtG9sUZZuHYpY50hS5z 2ndEN5V9xHnWOllqq2ziwQ4HEyTXFbQK1s0GbXP4PECc9cGDgUBZP+4OI70mUVFl4cCu kyCdTvI+/JF77+DXcULPqCNhx890YauO5Gj956Kt85t7i0SEekgB3fjrOr8ArR4FrrZk DPMDfz1Ul/PaqdUe7MY9HVeUCFj9tI4TdF2SOAXUewL+3F13vwMuHDagX2cTlT7QQT8S j5y+37sSNfkiUP99YUSs6JdZFmmzFvZa4sZeZgf84pdwxb0jGsHKjM6p2+xyz5zgr9s9 Uz7A== MIME-Version: 1.0 X-Received: by 10.236.30.33 with SMTP id j21mr2248716yha.157.1413878013619; Tue, 21 Oct 2014 00:53:33 -0700 (PDT) Date: Tue, 21 Oct 2014 09:53:33 +0200 Message-ID: Subject: bug in zsh wait builtin - rhbz#1150541 From: Tim Speetjens To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary=089e0116085cc1f79e0505ea20c9 --089e0116085cc1f79e0505ea20c9 Content-Type: text/plain; charset=UTF-8 Dear zsh workers, I'ld like to report a bug originally filed in https://bugzilla.redhat.com/show_bug.cgi?id=1150541 which is still present in the latest version, 5.0.7 Title: zsh wait builtin shows an error and doesn't propagate exit code for a finished child process Description of problem: When a child process is started, and finished before a call to wait, an error is signaled. Also the exit code for wait is 1, where it should be the exit code of the child process Version-Release number of selected component: zsh-4.3.10-7 (rhel6, x86_64) zsh-5.0.2-7 (rhel7, x86_64) zsh 5.0.7 (f21 rawhide, x86_64) zsh 5.0.7 from source How reproducible: 100% Steps to Reproduce: Run the following script with zsh (or with zsh in ksh emulation mode): #!/bin/ksh sh -c "echo done" & pid1=$! sleep 1 wait $pid1 echo "rc: $?" sh -c "exit 3" & pid2=$! sleep 1 wait $pid2 echo "rc: $?" Actual results: $ zsh test.sh done test.sh:wait:5: pid 6156 is not a child of this shell rc: 1 test.sh:wait:11: pid 6159 is not a child of this shell rc: 1 Expected results (also seen when running the script with bash or mksh): $ zsh test.sh done rc: 0 rc: 3 Kind regards Tim Speetjens --089e0116085cc1f79e0505ea20c9--