[Bug 9631] New: top with nice process shows "R N"
bugzilla at busybox.net
bugzilla at busybox.net
Wed Feb 1 23:17:35 UTC 2017
https://bugs.busybox.net/show_bug.cgi?id=9631
Bug ID: 9631
Summary: top with nice process shows "R N"
Product: Busybox
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: alt.j2-4o4s2yon at yopmail.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
a process having nice set is shown in the stat column with the value "R N".
the space in the middle breaks batch mode parsing with awk and other tools
expecting whitespace as field delimiter.
the culprit is in https://git.busybox.net/busybox/tree/libbb/procps.c around
line 475.
if (sp->vsz == 0 && sp->state[0] != 'Z')
sp->state[1] = 'W';
else
sp->state[1] = ' ';
if (tasknice < 0)
sp->state[2] = '<';
else if (tasknice) /* > 0 */
sp->state[2] = 'N';
else
sp->state[2] = ' ';
apparently the code assumes a non-zombie process will never have nice set.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list