zsh-users
 help / color / mirror / code / Atom feed
* No `you have running jobs.' message
@ 1999-11-28 12:52 Stefan Troeger
  1999-11-28 18:41 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Troeger @ 1999-11-28 12:52 UTC (permalink / raw)
  To: zsh-users

Hi,

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?

Ciao,
	Stefan


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No `you have running jobs.' message
  1999-11-28 12:52 No `you have running jobs.' message Stefan Troeger
@ 1999-11-28 18:41 ` Bart Schaefer
  1999-11-29 11:47   ` Zefram
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 1999-11-28 18:41 UTC (permalink / raw)
  To: Stefan Troeger, zsh-users

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No `you have running jobs.' message
  1999-11-28 18:41 ` Bart Schaefer
@ 1999-11-29 11:47   ` Zefram
  1999-11-29 12:54     ` Vincent Lefevre
  1999-11-30 15:14     ` Ollivier Robert
  0 siblings, 2 replies; 6+ messages in thread
From: Zefram @ 1999-11-29 11:47 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: stefan.troeger, zsh-users

Bart Schaefer wrote:
>The effect of this patch is that "setopt nohup" suppresses the "running
>jobs" message.

Please don't do this.  Warning about the existence of jobs is logically
distinct from killing them automatically.  In fact, I use the combination
of behaviours that this patch makes impossible -- I like having
the warning, but if I exit anyway I want jobs to continue running.
Warning suppression should be a separate option.

-zefram


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No `you have running jobs.' message
  1999-11-29 11:47   ` Zefram
@ 1999-11-29 12:54     ` Vincent Lefevre
  1999-11-30 15:14     ` Ollivier Robert
  1 sibling, 0 replies; 6+ messages in thread
From: Vincent Lefevre @ 1999-11-29 12:54 UTC (permalink / raw)
  To: zsh-users

On Mon, Nov 29, 1999 at 11:47:05 +0000, Zefram wrote:
> Please don't do this.  Warning about the existence of jobs is logically
> distinct from killing them automatically.  In fact, I use the combination
> of behaviours that this patch makes impossible -- I like having
> the warning, but if I exit anyway I want jobs to continue running.

Me too! :)

-- 
Vincent Lefèvre <vincent@vinc17.org> - PhD student in Computer Science
Web: <http://www.vinc17.org/> or <http://www.ens-lyon.fr/~vlefevre/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No `you have running jobs.' 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
  1 sibling, 1 reply; 6+ messages in thread
From: Ollivier Robert @ 1999-11-30 15:14 UTC (permalink / raw)
  To: zsh-users

According to Zefram:
> Please don't do this.  Warning about the existence of jobs is logically
> distinct from killing them automatically.  In fact, I use the combination

I've always liked the [t]csh behaviour of detaching jobs automatically
(automatic nohup)... Having to use disown/nohup is a small annoyance.
-- 
Ollivier ROBERT -=- Eurocontrol EEC/TEC -=- roberto@eurocontrol.fr
The Postman hits! The Postman hits! You have new mail.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No `you have running jobs.' message
  1999-11-30 15:14     ` Ollivier Robert
@ 1999-11-30 15:29       ` Clint Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Clint Adams @ 1999-11-30 15:29 UTC (permalink / raw)
  To: zsh-users

> I've always liked the [t]csh behaviour of detaching jobs automatically
> (automatic nohup)... Having to use disown/nohup is a small annoyance.

tcsh is more complex than that.  It will nohup jobs run with &, but
upon exit will kill without warning any jobs that you suspend and
background.

Your annoyance can be alleviated by putting "setopt nohup"
in the appropriate startup file.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-11-30 15:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-28 12:52 No `you have running jobs.' message Stefan Troeger
1999-11-28 18:41 ` Bart Schaefer
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

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).