bin/59417: ps -o rtprio does not work
Jan Willem Knopper
jwk at stack.nl
Tue Nov 18 07:00:23 PST 2003
>Number: 59417
>Category: bin
>Synopsis: ps -o rtprio does not work
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 18 07:00:21 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Jan Willem Knopper
>Release: FreeBSD 5.1-CURRENT i386
>Organization:
M.C.G.V. Stack
>Environment:
System: FreeBSD turtle.stack.nl 5.1-CURRENT FreeBSD 5.1-CURRENT #15: Thu Oct 9 11:43:55 CEST 2003 jilles at turtle.stack.nl:/usr/obj/usr/src/sys/TURTLE i386
>Description:
'ps -o rtprio' gives junk output: for example '208:208' instead of
'normal'
>How-To-Repeat:
% ps -p $$ -O rtprio
PID RTPRIO TT STAT TIME COMMAND
50378 208:208 pi Ss 0:00,32 -zsh (zsh)
instead of
jwk at turtle:/home/jwk/src/ps% ./ps -p $$ -O rtprio
PID RTPRIO TT STAT TIME COMMAND
50378 normal pi Ss 0:00,33 -zsh (zsh)
>Fix:
patch below
--- ps-print-rtprio.patch begins here ---
--- /usr/src/bin/ps/print.c.orig Tue Nov 18 15:47:44 2003
+++ /usr/src/bin/ps/print.c Tue Nov 18 15:45:36 2003
@@ -655,7 +655,7 @@
unsigned class, level;
v = ve->var;
- lpri = (struct priority *) ((char *)k + v->off);
+ lpri = (struct priority *) ((char *)k->ki_p + v->off);
class = lpri->pri_class;
level = lpri->pri_level;
switch (class) {
--- ps-print-rtprio.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list