The CodingStyle document suggests programs should allow for
cmdlines of at least 128k. Only the ps program can display
such a cmdline, and only with multiple -w switches.
The library function file2strvec can essentially return
a cmdline of unlimited length. However, the library function
fill_cmdline_cvt used an arbitrary upper limit of 2048 for
buffers automatically allocated on the stack.
This patch raises the fill_cmdline_cvt upper limit to 128k via
dymaically acquired utility buffers ensured by the openproc
function.
It also makes indentation consistent in the openproc function.
There were numerous library memory allocation inconsistencies.
Some were checked for failure and others were not.
All library source modules were modified to utilize the alloc.h
memory rouines which are consistent in dealing with errors.
A callback provision in the form of xalloc_err_handler
(of type message_fn) was added to the alloc module.
This change allowed a program like top, who alters the
termios structure, to override the default fprint(stderr...)
behavior in the event of an error.
The new function xstrdup was also added for symmetry.
Makefile.am testsuite needed to explicitly state the files because while
everything else works, make distcheck fails.
NEWS got updated with the Debian bug number for pgrep -u
There is a race condition between expect script consuming the output
from slabtop. There were a sequences of lines that looked like
^\d+ ... \s*
with the last \s* consuming the first space on the start of the line.
However if the line takes too long to print, then expect stops there and
the space at the start of the subsquent line does not match.
The solution is a \s* at the start ofthe line.
Fix to ./autogen.sh error bellow.
/usr/share/automake-1.11/am/dejagnu.am: DEJATOOL was already defined in condition LINUX, which is included in condition TRUE ...
testsuite/Makefile.am:6: ... `DEJATOOL' previously defined here
Reference: http://www.freelists.org/post/procps/procpsng-331-nearly-there,5
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Makefile will now only test for Linux systems, a work around in the
makefile due to some silly redefine restrictions.
uptime and w now won't error due to being one user logged in, thanks to
Sami for the patch
kill processes by pid test commented out due to false negatives
pwdx process 1 check also commented out due to false negatives
procps works well on Linux, on other arches there are some strange
differences due to their emulation of procfs which is not 100%
Disabling checks for non-linux until that can be sorted out.
Using ncurses initscr/endwin clears the screen for xterm/etc it
now prints raw text using printf
Bug-Debian: http://bugs.debian.org/503089
Author: Craig Small <csmall@debian.org>
Things like lexgrog and whatis and apropos need to look a the line in
the NAME section in the manpage. There used to be a macro there which
they don't understand.
lexgrog top.1
top.1: parse failed
configure.ac now set to 3.3.1
vmstat -p has not worked for a long time, this applies Debian patch
vmstat_part_format, the details:
Author: Daniel Novotny
Description: The contents of /proc/diskstats have changed since 2.6.25
Changed PATH_MAX to 32 because its missing on hurd
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=485243
Bug-Debian: http://bugs.debian.org/588677
Last-Update: 2010-11-17
Notice that contents of file library.map file are almost certainly
wrong as it is making everything exported.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
. 3 pgms require non-wide <curses.h> or <ncurses.h>
This patch represents the tests for a minimal environment
consistent with current ncurses needs.
It should allow a successful configure and build
. 1 program uses curses (top)
. 2 programs use ncurses (slabtop, watch)
. all 3 include non-wide <curses.h> or <ncurses.h>
. those 3 do not currently need wide support
. but anticipating nls, we link against libncursesw
This patch ensures an environment consistent with current
and future ncurses needs.
tweaked signal setup valgrind complaint as nls
some input error messages made more descriptive
eliminated audible escape a from all error messa
added include of proc readproc.h to top.h
optimization for show_special function
remove unnecessary variables clang analyze