Date: Tue, 3 Jun 1997 15:28:52 -0500 (CDT) From: johnp@lodgenet.com To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/3769: problem with lstart option in `ps' Message-ID: <199706032028.PAA24281@daria.lodgenet.com> Resent-Message-ID: <199706032050.NAA21961@hub.freebsd.org>
index | next in thread | raw e-mail
>Number: 3769
>Category: bin
>Synopsis: strftime %C should be %c (lstart option)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jun 3 13:50:01 PDT 1997
>Last-Modified:
>Originator: 1John Prince
>Organization:
>Release: FreeBSD 2.2.1-RELEASE i386
>Environment:
>Description:
The ps function has an option lstart. The man page specifies
that is uses the ``%C'' format described in strftime(3).
This I believe to be in error since %C refers to century.
The correct option should be ``%c''.
>How-To-Repeat:
ps -ax -o pid,lstart,command
>Fix:
patch for print.c
*** print.c.old Tue Jun 3 14:58:56 1997
--- print.c Tue Jun 3 14:55:57 1997
***************
*** 402,408 ****
(void)printf("%-*s", v->width, "-");
return;
}
! (void)strftime(buf, sizeof(buf) -1, "%C",
localtime(&k->ki_u.u_start.tv_sec));
(void)printf("%-*s", v->width, buf);
}
--- 402,408 ----
(void)printf("%-*s", v->width, "-");
return;
}
! (void)strftime(buf, sizeof(buf) -1, "%c",
localtime(&k->ki_u.u_start.tv_sec));
(void)printf("%-*s", v->width, buf);
}
patch for ps.man1
*** ps.1.old Tue Jun 3 15:08:34 1997
--- ps.1 Tue Jun 3 15:09:31 1997
***************
*** 217,223 ****
The soft limit on memory used, specified via a call to
.Xr setrlimit 2 .
.It lstart
! The exact time the command started, using the ``%C'' format described in
.Xr strftime 3 .
.It nice
The process scheduling increment (see
--- 217,223 ----
The soft limit on memory used, specified via a call to
.Xr setrlimit 2 .
.It lstart
! The exact time the command started, using the ``%c'' format described in
.Xr strftime 3 .
.It nice
The process scheduling increment (see
>Audit-Trail:
>Unformatted:
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706032028.PAA24281>
