zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: trap, eval and wait (was: [BUG] exec + builtin and traps)
Date: Wed, 13 Sep 2017 10:55:43 +0100	[thread overview]
Message-ID: <20170913105543.3e6168f7@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20170912160409.2ff01c0f@pwslap01u.europe.root.pri>

On Tue, 12 Sep 2017 16:04:09 +0100
Peter Stephenson <p.stephenson@samsung.com> wrote:
> Quite possibly any of the above flags should mean wait ignores the job,
> but I've taken STAT_NOPRINT as the most logical to test here as it
> basically means "user is not interested in this".

I've committed this but I'm wondering if it would be sensible to add
STAT_DONE here? There's nothing to wait for if the job is done.
(This case is only for "wait" without an argument, so just wait for
everything we think is outstanding.)

By the way, unrelated to the bug (though it works around it), if you're
really interested in the status of the last background job, I think you
need to use "wait $!" anyway --- otherwise if the job is already
finished, "wait" will simply return immediately with status 0.  Waiting
for $! is the only special case available to handle the race.

pws


      reply	other threads:[~2017-09-13  9:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170912101045epcas2p4cae7e7df78ef035900f9c6099dc054fb@epcas2p4.samsung.com>
2017-09-12 10:02 ` [BUG] exec + builtin and traps Vincent Lefevre
2017-09-12 10:19   ` Peter Stephenson
2017-09-12 10:39     ` Vincent Lefevre
2017-09-12 10:50       ` Peter Stephenson
2017-09-12 11:42         ` Vincent Lefevre
2017-09-12 11:51           ` Peter Stephenson
2017-09-12 12:02             ` Vincent Lefevre
2017-09-12 12:10               ` Peter Stephenson
2017-09-12 14:21                 ` trap, eval and wait (was: [BUG] exec + builtin and traps) Vincent Lefevre
2017-09-12 15:04                   ` Peter Stephenson
2017-09-13  9:55                     ` Peter Stephenson [this message]

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=20170913105543.3e6168f7@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).