summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-05-24 19:53:47 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-05-24 19:53:47 +0000
commit933d4a37fa5f7db6031a48a69f593f336934ad65 (patch)
tree76f9a8e4d519ca4508cb6a52ae9975846c6682be
parent3f9d1b0c94a7d13a7d293a9825affdcc87c18702 (diff)
(S_proc_getprocinfo): Set PI->exitstatus and PI->sigcode.
-rw-r--r--proc/info.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/proc/info.c b/proc/info.c
index 1390b0a2..c64dd6d7 100644
--- a/proc/info.c
+++ b/proc/info.c
@@ -420,6 +420,13 @@ S_proc_getprocinfo (struct proc *callerp,
for (tp = p; !tp->p_loginleader; tp = tp->p_parent)
assert (tp);
pi->logincollection = tp->p_pid;
+ if (p->p_dead || p->p_stopped)
+ {
+ pi->exitstatus = p->p_status;
+ pi->sigcode = p->p_sigcode;
+ }
+ else
+ pi->exitstatus = pi->sigcode = 0;
pi->nthreads = nthreads;