Bug#2159: "ps pids" lists more than just pids
Package: procps
Version: 0.98-0
The ps man page says:
ps [-] [lujsvmaxScewhrnu] [txx] [O[+|-]k1[[+|-]k2...]]
[pids]
...
pids List only the specified processes; they are comma-
delimited. The list must be given immediately after
the last option in a single command-line argument,
with no intervening space, e.g. ps -j1,4,5. Lists
specified in subsequent arguments are catenated, e.g.
ps -l 1,2 3,4 5 6 will list all of the processes 1-6
in long format.
But, ps shows other processes in addition to what I ask for:
deimos:~/proj/debian:[812]% ps 1
PID TTY STAT TIME COMMAND
1 ? S 0:13 init [2]
2329 pp0 R 0:00 ps 1
13776 ? S 0:10 fvwm
13788 ? S 0:00 xclock
13789 ? S 0:00 xload
13797 pp0 S 0:07 -zsh
13822 ? S 6:10 emacs
13828 ? S 0:00 /usr/lib/emacs/19.29/i486-debian-linuxaout/wakeup
16975 pp4 SW 0:00 ftp
22415 ? S 0:17 /usr/local/etc/afpd
31599 ? S 0:27 /usr/local/lib/netscape-2.0b5/netscape
32486 pp1 S 0:00 rlogin
32488 pp1 S 0:00 rlogin
(It looks like the extra processes are what I'd get if I didn't specify any
pids on the command line.)
Also, "ps --help" doesn't mention being able to specify pids:
usage: ps -acehjlnrsSuvwx{t<tty>|#|O[-]u[-]U..} \
--sort:[-]key1,[-]key2,...
--help gives you this message
--version prints version information
--
Robert Leslie
rob@advantage.org
Reply to: