summaryrefslogtreecommitdiff
path: root/proc/info.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-05-30 03:10:19 +0000
committerRoland McGrath <roland@gnu.org>1999-05-30 03:10:19 +0000
commitd1eca298a62e3eb7ebedaa0d176a1d310c1a53ce (patch)
tree62ee6b0d3d8a29a33db5400a4fb0def996506fce /proc/info.c
parentec68b7ccbcecdfae8aca3275fcf4e1f8d81fa7c1 (diff)
1999-05-29 Roland McGrath <roland@baalperazim.frob.com>
* mgt.c (add_tasks): Skip invalid (null) rights in tasks array. * info.c (S_proc_pid2task): Add assert for p_task right validity.
Diffstat (limited to 'proc/info.c')
-rw-r--r--proc/info.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/proc/info.c b/proc/info.c
index 1a398461..a53df08a 100644
--- a/proc/info.c
+++ b/proc/info.c
@@ -1,5 +1,5 @@
/* Process information queries
- Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation
+ Copyright (C) 1992,93,94,95,96,99 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -55,6 +55,7 @@ S_proc_pid2task (struct proc *callerp,
if (! check_owner (callerp, p))
return EPERM;
+ assert (MACH_PORT_VALID (p->p_task));
*t = p->p_task;
return 0;
@@ -426,7 +427,7 @@ S_proc_getprocinfo (struct proc *callerp,
assert (tp);
pi->logincollection = tp->p_pid;
if (p->p_dead || p->p_stopped)
- {
+ {
pi->exitstatus = p->p_status;
pi->sigcode = p->p_sigcode;
}