zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: interrupt handling bug (again?)
Date: Sun, 2 Jul 2017 20:32:52 +0100	[thread overview]
Message-ID: <20170702203252.11c22a94@ntlworld.com> (raw)
In-Reply-To: <20170630221610.442726ab@ntlworld.com>

On Fri, 30 Jun 2017 22:16:10 +0100
Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> I think when the SUPERJOB is put into the background it should no longer
> have STAT_CURSH status.  Does that sound reasonable?  I'm not sure why
> it would have it anyway, should it perhaps be removed when we mark it as
> STAT_SUPERJOB, which is kind of decurrentshellising it in any case?

Done this way, tied to something else we don't want when something's
backgrouned, it's probably good enough for now.

pws

diff --git a/Src/jobs.c b/Src/jobs.c
index d1b98ac..32f7daa 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -2288,8 +2288,10 @@ bin_fg(char *name, char **argv, Options ops, int func)
 	case BIN_FG:
 	case BIN_BG:
 	case BIN_WAIT:
-	    if (func == BIN_BG)
+	    if (func == BIN_BG) {
 		jobtab[job].stat |= STAT_NOSTTY;
+		jobtab[job].stat &= ~STAT_CURSH;
+	    }
 	    if ((stopped = (jobtab[job].stat & STAT_STOPPED))) {
 		makerunning(jobtab + job);
 		if (func == BIN_BG) {


  reply	other threads:[~2017-07-02 19:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06 19:08 Mikael Magnusson
2017-06-24 19:03 ` Bart Schaefer
2017-06-30 13:33   ` Peter Stephenson
2017-06-30 21:16     ` Peter Stephenson
2017-07-02 19:32       ` Peter Stephenson [this message]
2017-07-02 20:05         ` Bart Schaefer
2017-07-02 20:22           ` Peter Stephenson
2017-07-03 15:09   ` Peter Stephenson
2017-07-10  9:36     ` Peter Stephenson

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=20170702203252.11c22a94@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).