zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: Using "source" in a function breaks job control
Date: Thu, 23 Apr 2015 21:13:31 +0100	[thread overview]
Message-ID: <20150423211331.5ea4baf0@ntlworld.com> (raw)
In-Reply-To: <150422215539.ZM14251@torch.brasslantern.com>

On Wed, 22 Apr 2015 21:55:39 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> It has something to do with tracking the job table.

Looks like we lost STAT_SUPERJOB in the flags of the job that got
created when we forked.  In the bad case the STAT_ flags are
SUBLEADER|CURSH|INUSE|LOCKED and in the good case there is also
SUPERJOB.  The SUBLEADER in the bad case means that the logic was
probably on roughly the right lines, though that's not a great surprise
since we can see the forked subshell is there.  SUPERJOB can only get
added at one point in execpline(), although it can also be removed but
in that case the job should get WASSUPER which doesn't get removed until
the job is cleared.  So the differences in execpline(), which I never
understood, might be informative.

pws


  reply	other threads:[~2015-04-23 20:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 18:11 Daniel Hahler
2015-04-22 20:41 ` Peter Stephenson
2015-04-22 21:26 ` Peter Stephenson
2015-04-23  4:55   ` Bart Schaefer
2015-04-23 20:13     ` Peter Stephenson [this message]
2015-04-24  6:22       ` Bart Schaefer
2015-04-24 15:25         ` Peter Stephenson
2015-04-24 15:43           ` Peter Stephenson
2015-04-24 16:21           ` Bart Schaefer
2015-04-27 17:29             ` Peter Stephenson
2015-04-28 10:18             ` Peter Stephenson
2015-04-28 15:57               ` Bart Schaefer

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=20150423211331.5ea4baf0@ntlworld.com \
    --to=p.w.stephenson@ntlworld.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).