From 9555dcf9ff186881d0a01fc82ba29f5baa4a69d0 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 6 Apr 1995 18:28:59 +0000 Subject: (S_proc_getprocinfo): New var `tp'. Bother to set PI->logincollection. --- proc/info.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/proc/info.c b/proc/info.c index 4f33a68c..d16d8230 100644 --- a/proc/info.c +++ b/proc/info.c @@ -1,5 +1,5 @@ /* Process information queries - Copyright (C) 1992, 1993, 1994 Free Software Foundation + Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation This file is part of the GNU Hurd. @@ -318,6 +318,7 @@ S_proc_getprocinfo (struct proc *callerp, int i, j; int didalloc = 0; u_int tkcount, thcount; + struct proc *tp; if (!p) return ESRCH; @@ -351,6 +352,9 @@ S_proc_getprocinfo (struct proc *callerp, pi->ppid = p->p_parent->p_pid; pi->pgrp = p->p_pgrp->pg_pgid; pi->session = p->p_pgrp->pg_session->s_sid; + for (tp = p; !tp->p_loginleader; tp = tp->p_parent) + assert (tp); + pi->logincollection = tp->p_pid; pi->nthreads = nthreads; -- cgit v1.2.3