Subject: bin/11930: ps not documented about parentheses around command
To: None <gnats-bugs@gnats.netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-bugs
Date: 01/10/2001 15:18:17
>Number: 11930
>Category: bin
>Synopsis: ps(1) shows parantheses around some (commands) but not documented.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 10 15:18:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Jeremy C. Reed
>Release: 1.5.1_ALPHA
>Organization:
>Environment:
System: NetBSD rainier.reedmedia.net 1.5.1_ALPHA NetBSD 1.5.1_ALPHA (JCR-1.5-20010108) #0: Mon Jan 8 09:25:45 PST 2001 reed@rainier:/usr/src/sys/arch/i386/compile/JCR-1.5-20010108 i386
>Description:
ps(1) sometimes shows parentheses around some commands. The manual
page doesn't tell why. The source is not clear.
>How-To-Repeat:
$ ps -ax | grep '('
0 ?? DLs 0:00.18 (swapper)
2 ?? DL 0:00.07 (pagedaemon)
3 ?? DL 0:02.38 (reaper)
4 ?? DL 0:20.63 (ioflush)
219 ?? S 27:18.14 /usr/X11R6/bin/X :0 (XF86_SVGA)
235 ?? I 0:00.64 (dns helper) (netscape)
>Fix:
Patches for /usr/src/bin/ps/print.c and ps.1 follow:
--- /usr/src/bin/ps/print.c Wed Jan 10 15:01:12 2001
+++ ps-print.c Wed Jan 10 15:07:09 2001
@@ -165,6 +165,8 @@
char *title;
int namelen;
+ /* See if it looks like its a special system process or thread */
+
if (argv == 0 || argv[0] == 0)
return (1);
@@ -304,6 +306,10 @@
fmt_putc(' ', &left);
}
}
+ /*
+ * Special system processes or threads are
+ * shown within parentheses.
+ */
if (titlecmp(name, argv)) {
fmt_putc('(', &left);
fmt_puts(name, &left);
--- /usr/src/bin/ps/ps.1 Sun Jun 25 07:32:15 2000
+++ ps.1 Wed Jan 10 15:14:51 2001
@@ -386,6 +386,7 @@
is entitled to destroy this information, so the names cannot be depended
on too much.
The ucomm (accounting) keyword can, however, be depended on.
+Special system processes or threads are shown within parentheses.
.Sh KEYWORDS
The following is a complete list of the available keywords and their
meanings.
>Release-Note:
>Audit-Trail:
>Unformatted: