diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-04-06 18:28:59 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-04-06 18:28:59 +0000 |
commit | 9555dcf9ff186881d0a01fc82ba29f5baa4a69d0 (patch) | |
tree | 2b33ea614c1322ed60f6f02a5c8e97b7d5976953 /proc | |
parent | d7245708d0cbb3a90d52a3eb078c1f8aac8db43b (diff) |
(S_proc_getprocinfo): New var `tp'. Bother to set
PI->logincollection.
Diffstat (limited to 'proc')
-rw-r--r-- | proc/info.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |