diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-03-03 17:20:29 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-03-03 17:20:29 +0000 |
commit | a69a4a568209bb69852224e2cd6f6394ed4da746 (patch) | |
tree | 35d8778bf8e995cb348c0bb9d78d38b7a7e6e356 /sys/kern/kern_proc.c | |
parent | 5aeba8440e8d2256e4b716030f97e3bf493b725a (diff) |
From NetBSD: 960217 merge
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 85514b0bbe8..0e55acd5de9 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -1,4 +1,5 @@ -/* $NetBSD: kern_proc.c,v 1.12 1995/03/19 23:44:49 mycroft Exp $ */ +/* $OpenBSD: kern_proc.c,v 1.2 1996/03/03 17:19:51 niklas Exp $ */ +/* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1993 @@ -74,6 +75,11 @@ u_long pgrphash; struct proclist allproc; struct proclist zombproc; +static void orphanpg __P((struct pgrp *)); +#ifdef DEBUG +void pgrpdump __P((void)); +#endif + /* * Initialize global process hashing structures. */ @@ -280,8 +286,6 @@ pgdelete(pgrp) FREE(pgrp, M_PGRP); } -static void orphanpg(); - /* * Adjust pgrp jobc counters when specified process changes process group. * We count the number of processes in each process group that "qualify" @@ -351,6 +355,7 @@ orphanpg(pg) } #ifdef DEBUG +void pgrpdump() { register struct pgrp *pgrp; @@ -358,7 +363,7 @@ pgrpdump() register i; for (i = 0; i <= pgrphash; i++) { - if (pgrp = pgrphashtbl[i].lh_first) { + if ((pgrp = pgrphashtbl[i].lh_first) != NULL) { printf("\tindx %d\n", i); for (; pgrp != 0; pgrp = pgrp->pg_hash.le_next) { printf("\tpgrp %p, pgid %d, sess %p, sesscnt %d, mem %p\n", |