diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2010-06-27 03:26:40 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2010-06-27 03:26:40 +0000 |
commit | d9dbf15676a87645f76cc68576f597ffe08db835 (patch) | |
tree | 03996b1261c873a21d1f4d5523895f96e29f196d | |
parent | 78ed39dd32b81a6677f6256dbda9179bd8c47a1b (diff) |
A process on the zombie list can have a NULL p_pgrp if it sleeps when
grabbing allproclk in proc_zap(); don't dereference the process's p_pgrp
if that happens.
ok art@ thib@
-rw-r--r-- | sys/kern/kern_fork.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index b67e1e0af96..6721ea107d0 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.111 2010/05/29 02:47:48 guenther Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.112 2010/06/27 03:26:39 guenther Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -517,7 +517,7 @@ pidtaken(pid_t pid) if (pgfind(pid) != NULL) return (1); LIST_FOREACH(p, &zombproc, p_list) - if (p->p_pid == pid || p->p_pgid == pid) + if (p->p_pid == pid || (p->p_pgrp && p->p_pgrp->pg_id == pid)) return (1); return (0); } |