Bug#1713: procps: manpage doesn't tell the truth
Package: procps
Version: 0.97
Package_Revision: 4
The manpage ps(1) tells us:
------------------------------- happs 8<------------------------------
COMMAND-LINE OPTIONS
Command line arguments may optionally be preceeded by a
'-', but there is no need for it. There are also some
"long options" in GNU style; see below for those.
(..)
w wide output: don't truncate command lines to fit on
one line.
------------------------------- happs 8<------------------------------
But ps does something else. You may specify up to three 'w's in the
command line and you'll only understand the behaviour if you look at
the code:
------------------------------- happs 8<------------------------------
int set_maxcmd(int w_opts)
{
struct winsize win;
maxcols = 80;
if (ioctl(1, TIOCGWINSZ, &win) != -1 && win.ws_col > 0)
maxcols = win.ws_col;
switch (w_opts) {
case 0: break;
case 1: maxcols += 52; break;
case 2: maxcols *= 2; break;
default: maxcols = MAXCMD;
}
return maxcols - strlen(hdrs[CL_fmt]) + 7;
}
------------------------------- happs 8<------------------------------
I would recommend a) change the manpage entry or b) change the whole
handling of 'w'-processing. If the maintainer is interested, I can
send him a patch for the latter
Regards,
Joey
--
/ Martin Schulze * joey@infodrom.north.de * 26129 Oldenburg /
/ +49-441-777884 * Login&Passwd: nuucp * Index: ~/ls-lR.gz /
/ http://home.pages.de/~joey/
/ Linux - the choice of a GNU generation /
----------------------------------------------------------------
30.10.95: Oldenburger Linux-Stammtisch, ab 20h im DaCapo
Reply to: