From: Bart Schaefer <schaefer@brasslantern.com>
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: Using "source" in a function breaks job control
Date: Thu, 23 Apr 2015 23:22:55 -0700 [thread overview]
Message-ID: <CAH+w=7bHO7Y+9tZg7tgjVkAPkKtbMHnRSCTDtQ4vrttL2NdgOg@mail.gmail.com> (raw)
In-Reply-To: <20150423211331.5ea4baf0@ntlworld.com>
On Thu, Apr 23, 2015 at 1:13 PM, Peter Stephenson
<p.w.stephenson@ntlworld.com> wrote:
> 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.
That was the needed clue. The problem is that list_pipe_job is wrong
following the return from source(). The complications are that (1)
list_pipe_job is static to exec.c whereas source() is in init.c, and
(2) when I tried exporting list_pipe_job so it could be saved/restored
in source(), it fixed this issue but caused the test for "status of
recently exited background jobs is recorded" to fail (which confuses
me, because I can't see any reason source() would get involved in that
test).
Perhaps source() should be using execsave()/execrestore() instead of
the stack of local copies of the job state globals that it maintains?
next prev parent reply other threads:[~2015-04-24 6:52 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
2015-04-24 6:22 ` Bart Schaefer [this message]
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='CAH+w=7bHO7Y+9tZg7tgjVkAPkKtbMHnRSCTDtQ4vrttL2NdgOg@mail.gmail.com' \
--to=schaefer@brasslantern.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).