diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-08-02 12:37:08 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-08-02 12:37:08 +0000 |
commit | ae0e11c3a7e8743a297edd3dc8d588724e002f58 (patch) | |
tree | e98de32a4e1589ee10ae2fd56eb45c61b7c376ef /bin/ksh/jobs.c | |
parent | 3779fb4e5fb3fd5685e56551f89486ea5c50c714 (diff) |
Check to make sure process group is not 0 before sending a SIGHUP to
the process group on exit. This will cause problems if we are not
the process group leader.
Diffstat (limited to 'bin/ksh/jobs.c')
-rw-r--r-- | bin/ksh/jobs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/jobs.c b/bin/ksh/jobs.c index 91c974c41a4..06eaf54a91b 100644 --- a/bin/ksh/jobs.c +++ b/bin/ksh/jobs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: jobs.c,v 1.14 1999/07/14 13:37:23 millert Exp $ */ +/* $OpenBSD: jobs.c,v 1.15 1999/08/02 12:37:07 millert Exp $ */ /* * Process and job control @@ -288,7 +288,7 @@ j_exit() int killed = 0; for (j = job_list; j != (Job *) 0; j = j->next) { - if (j->ppid == procpid + if (j->ppid == procpid && j->pgrp != 0 && (j->state == PSTOPPED || (j->state == PRUNNING && ((j->flags & JF_FG) |