about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Src/signals.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/signals.c b/Src/signals.c
index 8cbcd2232..c4bbad952 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -572,7 +572,8 @@ killrunjobs(int from_signal)
         if ((from_signal || i != thisjob) && (jobtab[i].stat & STAT_LOCKED) &&
             !(jobtab[i].stat & STAT_NOPRINT) &&
             !(jobtab[i].stat & STAT_STOPPED)) {
-            if (killpg(jobtab[i].gleader, SIGHUP) != -1)
+            if (jobtab[i].gleader != getpid() &&
+		killpg(jobtab[i].gleader, SIGHUP) != -1)
                 killed++;
         }
     if (killed)