about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-28 18:43:23 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-28 18:43:23 +0000
commit23f3f128c7d92c668e563623ac03d22fe1e40167 (patch)
tree3071e629e26c81f8f8c3d7b39832442929994a35
parent154fb62464cbfbc7892284eee491c370fbed5548 (diff)
downloadzsh-23f3f128c7d92c668e563623ac03d22fe1e40167.tar.gz
zsh-23f3f128c7d92c668e563623ac03d22fe1e40167.tar.xz
zsh-23f3f128c7d92c668e563623ac03d22fe1e40167.zip
zsh-users/2748
-rw-r--r--Src/builtin.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 5d4b2be2c..88b90cfec 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3159,22 +3159,25 @@ checkjobs(void)
 {
     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;
+	}
     }
 }