diff options
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index b1d474c8cf0..bb18000ac04 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_proc.c,v 1.66 2016/03/04 14:09:37 deraadt Exp $ */ +/* $OpenBSD: kern_proc.c,v 1.67 2016/06/27 19:55:02 jca Exp $ */ /* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */ /* @@ -205,6 +205,20 @@ pgfind(pid_t pgid) } /* + * Locate a zombie process + */ +struct process * +zombiefind(pid_t pid) +{ + struct process *pr; + + LIST_FOREACH(pr, &zombprocess, ps_list) + if (pr->ps_mainproc->p_pid == pid) + return (pr); + return (NULL); +} + +/* * Move p to a new or existing process group (and session) * Caller provides a pre-allocated pgrp and session that should * be freed if they are not used. |