Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: long-standing tty related issue: wrapped Emacs not suspended



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;
 	}



Messages sorted by: Reverse Date, Date, Thread, Author