STAT flags for fg process group and session leader
This commit is contained in:
parent
63b001e5b9
commit
9f9c3a16ce
1
NEWS
1
NEWS
@ -1,6 +1,7 @@
|
|||||||
procps-3.2.0 --> procps-3.2.1
|
procps-3.2.0 --> procps-3.2.1
|
||||||
|
|
||||||
build w/ curses in odd location
|
build w/ curses in odd location
|
||||||
|
ps: STAT flags for fg process group and session leader
|
||||||
|
|
||||||
procps-3.1.15 --> procps-3.2.0
|
procps-3.1.15 --> procps-3.2.0
|
||||||
|
|
||||||
|
@ -566,10 +566,12 @@ static int pr_oldstate(char *restrict const outbuf, const proc_t *restrict const
|
|||||||
static int pr_stat(char *restrict const outbuf, const proc_t *restrict const pp){
|
static int pr_stat(char *restrict const outbuf, const proc_t *restrict const pp){
|
||||||
int end = 0;
|
int end = 0;
|
||||||
outbuf[end++] = pp->state;
|
outbuf[end++] = pp->state;
|
||||||
if(pp->rss == 0 && pp->state != 'Z') outbuf[end++] = 'W';
|
// if(pp->rss==0 && pp->state!='Z') outbuf[end++] = 'W'; // useless "swapped out"
|
||||||
if(pp->nice < 0) outbuf[end++] = '<';
|
if(pp->nice < 0) outbuf[end++] = '<';
|
||||||
if(pp->nice > 0) outbuf[end++] = 'N';
|
if(pp->nice > 0) outbuf[end++] = 'N';
|
||||||
if(pp->vm_lock) outbuf[end++] = 'L';
|
if(pp->vm_lock) outbuf[end++] = 'L';
|
||||||
|
if(pp->session == pp->tgid) outbuf[end++] = 's'; // session leader
|
||||||
|
if(pp->pgrp == pp->tpgid) outbuf[end++] = '+'; // in foreground process group
|
||||||
outbuf[end] = '\0';
|
outbuf[end] = '\0';
|
||||||
return end;
|
return end;
|
||||||
}
|
}
|
||||||
|
10
ps/ps.1
10
ps/ps.1
@ -261,18 +261,18 @@ D uninterruptible sleep (usually IO)
|
|||||||
R runnable (on run queue)
|
R runnable (on run queue)
|
||||||
S sleeping
|
S sleeping
|
||||||
T traced or stopped
|
T traced or stopped
|
||||||
W paging
|
W paging (2.4 kernels and older only)
|
||||||
X dead
|
X dead
|
||||||
Z a defunct ("zombie") process
|
Z a defunct ("zombie") process
|
||||||
|
|
||||||
For BSD formats and when the "stat" keyword is used, additional
|
For BSD formats and when the "stat" keyword is used, additional
|
||||||
letters may be displayed:
|
characters may be displayed:
|
||||||
|
|
||||||
W has no resident pages
|
< high-priority task
|
||||||
< high-priority process
|
|
||||||
N low-priority task
|
N low-priority task
|
||||||
L has pages locked into memory (for real-time and custom IO)
|
L has pages locked into memory (for real-time and custom IO)
|
||||||
|
s is a session leader
|
||||||
|
+ is in the foreground process group
|
||||||
|
|
||||||
SORT KEYS
|
SORT KEYS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user