zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Stefan Troeger <stefan.troeger@wirtschaft.tu-chemnitz.de>,
	zsh-users@sunsite.auc.dk
Subject: Re: No `you have running jobs.' message
Date: Sun, 28 Nov 1999 18:41:13 +0000	[thread overview]
Message-ID: <991128184113.ZM28661@candle.brasslantern.com> (raw)
In-Reply-To: <19991128135255.A2371@one.sttr.net>

On Nov 28,  1:52pm, Stefan Troeger wrote:
} Subject: No `you have running jobs.' message
}
} is it possible to turn of the `you have running jobs.' warning
} that pops up when exiting the shell while there are running
} background jobs and keep the `you have suspended jobs.' message?

No.  Suggested patch below; opinions from zsh-workers requested (please
follow-up to zsh-workers, not zsh-users).

The effect of this patch is that "setopt nohup" suppresses the "running
jobs" message.  Note that in 3.1.6-bart-8 and -pws-9, "unsetopt checkjobs"
suppresses both messages, no matter what the value of "nohup".

The change is smaller than the patch (lots of re-indented lines).

Index: Src/builtin.c
===================================================================
@@ -3159,22 +3159,25 @@
 {
     int i;
 
-    for (i = 1; i < MAXJOB; i++)
+    for (i = 1; i < MAXJOB; i++) {
 	if (i != thisjob && (jobtab[i].stat & STAT_LOCKED) &&
-	    !(jobtab[i].stat & STAT_NOPRINT))
-	    break;
-    if (i < MAXJOB) {
-	if (jobtab[i].stat & STAT_STOPPED) {
+	    !(jobtab[i].stat & STAT_NOPRINT)) {
+	    if (jobtab[i].stat & STAT_STOPPED) {
 
 #ifdef USE_SUSPENDED
-	    zerr("you have suspended jobs.", NULL, 0);
+		zerr("you have suspended jobs.", NULL, 0);
 #else
-	    zerr("you have stopped jobs.", NULL, 0);
+		zerr("you have stopped jobs.", NULL, 0);
 #endif
 
-	} else
-	    zerr("you have running jobs.", NULL, 0);
-	stopmsg = 1;
+		stopmsg = 1;
+	    } else if (isset(HUP)) {
+		zerr("you have running jobs.", NULL, 0);
+		stopmsg = 1;
+	    }
+	    if (stopmsg)
+		break;
+	}
     }
 }
 

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~1999-11-28 18:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-28 12:52 Stefan Troeger
1999-11-28 18:41 ` Bart Schaefer [this message]
1999-11-29 11:47   ` Zefram
1999-11-29 12:54     ` Vincent Lefevre
1999-11-30 15:14     ` Ollivier Robert
1999-11-30 15:29       ` Clint Adams

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=991128184113.ZM28661@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=stefan.troeger@wirtschaft.tu-chemnitz.de \
    --cc=zsh-users@sunsite.auc.dk \
    /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).