zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: Wait test failure
Date: Mon, 10 Aug 2015 16:18:17 +0100	[thread overview]
Message-ID: <20150810161817.080bcdee@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20150810135050.7b8499e2@pwslap01u.europe.root.pri>

Adding this code at the end of addbgstatus() in jobs.c

    fprintf(stderr, "Added bgstatus %d for %d\n", status, pid);
    fflush(stderr);

shows it's adding the wrong status (2) at the start:

Added bgstatus 2 for 24507
Added bgstatus 2 for 24506
Added bgstatus 3 for 24508

i.e. the problem isn't in the wait, it's already got the wrong status
when the process exits.  However, running this from the command line
doesn't show the problem, even with MONITOR turned off.

I'm wondering if in

  (exit 1) &
  one=$!
  (exit 2) &
  two=$!

when we handle the first background process, sometimes the second has
already exited so we use the status from that instead?  That would be
quite serious --- and quite possibly not a new effect, just exacerbated
by additional signal blocking.

pws


  reply	other threads:[~2015-08-10 15:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-08 19:05 5.0.9 eventually...? Peter Stephenson
2015-08-08 20:40 ` Bart Schaefer
2015-08-08 20:50   ` Mikael Magnusson
2015-08-09  0:20     ` Bart Schaefer
2015-08-08 21:22 ` Oliver Kiddle
2015-08-09  0:23   ` Bart Schaefer
2015-08-09  0:24     ` Bart Schaefer
2015-08-09 14:45       ` Jun T.
2015-08-09 16:15         ` Completion after assignment as command (Re: 5.0.9 eventually...?) Peter Stephenson
2015-08-10  7:12 ` 5.0.9 eventually...? Ismail Donmez
2015-08-10  9:59   ` Ismail Donmez
2015-08-10 12:50   ` Wait test failure Peter Stephenson
2015-08-10 15:18     ` Peter Stephenson [this message]
2015-08-10 15:48       ` Peter Stephenson
2015-08-10 17:44         ` Bart Schaefer
2015-08-10 19:11           ` Peter Stephenson
2015-08-10 17:24   ` A05 test failure (was Re: 5.0.9 eventually...?) Bart Schaefer
2015-08-11  8:20     ` Ismail Donmez
2015-08-17 19:54 ` 5.0.9 eventually...? Peter Stephenson
2015-08-17 20:08   ` Bart Schaefer
2015-08-17 21:17   ` Mikael Magnusson

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=20150810161817.080bcdee@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --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).