zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Hackers List <zsh-workers@zsh.org>
Subject: Re: long-standing tty related issue: wrapped Emacs not suspended
Date: Tue, 2 Oct 2018 16:32:07 +0100	[thread overview]
Message-ID: <20181002153209eucas1p180cad5f0c149b14bf8681f9c92c5e7ed~Z1HD7KDEc3130531305eucas1p19@eucas1p1.samsung.com> (raw)
In-Reply-To: <20180926161708.39be6402@camnpupstephen.cam.scsc.local>

I've been thinking about this tweak for a week and I'll forget about it
if I don't do it now.

Instead of reporting the superjob state when we have a subjob only when
the subjob is suspended, report it any time the subjob still has processes, as these are the things that the user is interested in until the subjob exits.
So if a superjob is suspended but a subjob isn't, as far as the user is
concerned everything is ticking along.

  "It's hard to see how this can be wrong."
      --- me

pws

diff --git a/Src/jobs.c b/Src/jobs.c
index 8103f5c..ec6d629 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -1060,17 +1060,13 @@ printjob(Job jn, int lng, int synch)
 	jn->other)
     {
 	Job sjn = &jobtab[jn->other];
-	if (sjn->stat & STAT_STOPPED)
+	if (sjn->procs || sjn->auxprocs)
 	{
 	    /*
-	     * A subjob is stopped, which will prevent further excution
-	     * of the superjob, which the user wants to know about.  So
-	     * report the status of the subjob as if it were the
-	     * user-visible superjob.
-	     *
-	     * TBD: there may be other times we want to do this
-	     * which would, for example, remove the need for the
-	     * hack at the top of the loop over processes just below.
+	     * A subjob still has process, which must finish before
+	     * further excution of the superjob, which the user wants to
+	     * know about.  So report the status of the subjob as if it
+	     * were the user-visible superjob.
 	     */
 	    jn = sjn;
 	}

      parent reply	other threads:[~2018-10-02 15:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20 12:30 Vincent Lefevre
2018-09-20 15:43 ` Joey Pabalinas
2018-09-20 23:10   ` Vincent Lefevre
2018-09-21 16:57 ` Peter Stephenson
2018-09-21 23:14   ` Joey Pabalinas
2018-09-22  1:17   ` Bart Schaefer
2018-09-22  5:51     ` Joey Pabalinas
2018-09-22 18:54       ` Vincent Lefevre
2018-09-22 21:27         ` Joey Pabalinas
2018-09-23  7:21           ` Vincent Lefevre
2018-09-24 19:51   ` Peter Stephenson
2018-09-25 10:37     ` Peter Stephenson
2018-09-25 17:04       ` Daniel Shahaf
2018-09-26  5:47       ` Bart Schaefer
2018-09-26 13:41         ` Peter Stephenson
2018-09-26 15:17         ` Peter Stephenson
     [not found]         ` <20180926161708.39be6402@camnpupstephen.cam.scsc.local>
2018-10-02 15:32           ` 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='20181002153209eucas1p180cad5f0c149b14bf8681f9c92c5e7ed~Z1HD7KDEc3130531305eucas1p19@eucas1p1.samsung.com' \
    --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).