summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libkvm/kvm_proc.c3
-rw-r--r--sys/kern/kern_proc.c1
-rw-r--r--sys/sys/user.h3
3 files changed, 5 insertions, 2 deletions
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
index f503489..8c2cf9c 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -182,7 +182,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
kp->ki_sigignore = procsig.ps_sigignore;
kp->ki_sigcatch = procsig.ps_sigcatch;
}
- if ((proc.p_flag & P_INMEM) && proc.p_stats != NULL) {
+ if ((proc.p_sflag & PS_INMEM) && proc.p_stats != NULL) {
if (KREAD(kd, (u_long)proc.p_stats, &pstats)) {
_kvm_err(kd, kd->program,
"can't read stats at %x", proc.p_stats);
@@ -311,6 +311,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
kp->ki_slptime = proc.p_slptime;
kp->ki_swtime = proc.p_swtime;
kp->ki_flag = proc.p_flag;
+ kp->ki_sflag = proc.p_sflag;
kp->ki_wchan = proc.p_wchan;
kp->ki_traceflag = proc.p_traceflag;
kp->ki_priority = proc.p_priority;
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index d517863..f5b35c1 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -432,6 +432,7 @@ fill_kinfo_proc(p, kp)
kp->ki_mtxname[MTXNAMELEN] = 0;
}
kp->ki_stat = p->p_stat;
+ kp->ki_sflag = p->p_sflag;
kp->ki_pctcpu = p->p_pctcpu;
kp->ki_estcpu = p->p_estcpu;
kp->ki_slptime = p->p_slptime;
diff --git a/sys/sys/user.h b/sys/sys/user.h
index 5583839..0b31fcd 100644
--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -143,7 +143,8 @@ struct kinfo_proc {
char ki_sparestrings[102]; /* spare string space */
struct rtprio ki_rtprio; /* Realtime priority */
struct rusage ki_rusage; /* process rusage statistics */
- long ki_spare[25]; /* spare constants */
+ long ki_sflag; /* PS_* flags */
+ long ki_spare[24]; /* spare constants */
};
void fill_kinfo_proc __P((struct proc *, struct kinfo_proc *));
OpenPOWER on IntegriCloud