diff options
author | Miles Bader <miles@gnu.org> | 1995-11-06 21:11:12 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-11-06 21:11:12 +0000 |
commit | 608f5c8591ec112a8190d26ba39a51a2825633ca (patch) | |
tree | 46c7851836ecf54d6a640fe9ecbf068731c10cc7 /proc | |
parent | a7819e462d30a7d2e0b1319adb54d1184d0dc186 (diff) |
(S_proc_getprocinfo):
Add NOISE and NOISE_LEN args. Fix various typos. Initialize ERR.
Diffstat (limited to 'proc')
-rw-r--r-- | proc/info.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/proc/info.c b/proc/info.c index 2aab66e4..e16ed890 100644 --- a/proc/info.c +++ b/proc/info.c @@ -304,13 +304,14 @@ S_proc_getprocinfo (struct proc *callerp, pid_t pid, int flags, int **piarray, - u_int *piarraylen) + u_int *piarraylen, + char **noise, unsigned *noise_len) { struct proc *p = pid_find (pid); struct procinfo *pi; int nthreads; thread_t *thds; - error_t err; + error_t err = 0; size_t structsize; int i; int didalloc = 0; @@ -354,11 +355,11 @@ S_proc_getprocinfo (struct proc *callerp, | (!p->p_pgrp->pg_orphcnt ? PI_ORPHAN : 0) | (p->p_msgport == MACH_PORT_NULL ? PI_NOMSG : 0) | (p->p_pgrp->pg_session->s_sid == p->p_pid ? PI_SESSLD : 0) - | (p->p_noonwer ? PI_NOTOWNED : 0) + | (p->p_noowner ? PI_NOTOWNED : 0) | (!p->p_parentset ? PI_NOPARENT : 0) | (p->p_traced ? PI_TRACED : 0) | (p->p_msgportwait ? PI_GETMSG : 0) - | (p->p_loginleader ? PI_LODINLD : 0)); + | (p->p_loginleader ? PI_LOGINLD : 0)); pi->owner = p->p_owner; pi->ppid = p->p_parent->p_pid; pi->pgrp = p->p_pgrp->pg_pgid; @@ -381,7 +382,7 @@ S_proc_getprocinfo (struct proc *callerp, for (i = 0; i < nthreads; i++) { - pi->threadinfos[i].dead = 0; + pi->threadinfos[i].died = 0; if (flags & PI_FETCH_THREAD_BASIC) { thcount = THREAD_BASIC_INFO_COUNT; @@ -390,7 +391,7 @@ S_proc_getprocinfo (struct proc *callerp, &thcount); if (err == MACH_SEND_INVALID_DEST) { - pi->threadinfos[i].dead = 1; + pi->threadinfos[i].died = 1; continue; } if (err && err != MACH_SEND_INVALID_DEST) @@ -406,7 +407,7 @@ S_proc_getprocinfo (struct proc *callerp, &thcount); if (err == MACH_SEND_INVALID_DEST) { - pi->threadinfos[i].dead = 1; + pi->threadinfos[i].died = 1; continue; } if (err && err != ESRCH) @@ -429,6 +430,10 @@ S_proc_getprocinfo (struct proc *callerp, if (err && didalloc) vm_deallocate (mach_task_self (), (u_int) *piarray, structsize); + if (!err) + /* Don't return anything for now. */ + *noise_len = 0; + return err; } |