Command line and full screen utilities for browsing procfs, a "pseudo" file system dynamically generated by Linux to provide information about the status of entries in its process table.
dedaf6e1a8
A scrollback buffer used in several terminal emulators could be a real inconvenience to a user following some resize operations. Extra keystroke(s) would frequently be required in order to properly render top's display. After much sleuthing we unearthed two terminfo strings which have the effect of disabling/restoring that darn scrollback buffer. They were well hidden under a title of strings 'to start/end programs using cup'. In turn, 'cup' deals with a tty's cursor addressing capability. We don't care what you call them or what they refer to so long as they get the job done. And these really do! Be advised, however, that there are some side effects, several of which can even be considered as beneficial: . enter_ca_mode/smcup/ti disables scrollback buffering ( and that's good, it's what we had always hoped for ) . exit_ca_mode/rmcup/te restores the scrollback buffer ( but also restores screen contents existing pre-top ) ( which is different from former program end results ) ( where that last rendered screen was left untouched ) . the above screen replacement would impact ^Z suspend ( thus we keep the scrollback buffer disabled during ) ( the suspend/resume sequence so that the users will ) ( have a visual clue that top is suspended not ended ) If a terminal does not support these terminfo strings, we will revert to top's former behavior at program end where we position the cursor at screen bottom and then output a single newline character. This will prevent a shell prompt from embedding within top's final screen. This commit's approach has been tested under a variety of emulators and window managers, many of which linked with libvte and others that employed their own scheme. Examples are: gnome_terminal; kde konsole; lxterminal; terminator; terminology; urxvt; xfce4-terminal; xterm. I do now believe that the whole SIGWINCH deal is done! (everything is perfectly justified plus right margins) (are completely filled, but of course it must be luck) Reference(s): http://www.freelists.org/post/procps/top-won-the-sigwinch-war http://www.freelists.org/post/procps/top-won-the-sigwinch-war,4 Signed-off-by: Jim Warner <james.warner@comcast.net> |
||
---|---|---|
contrib | ||
Documentation | ||
include | ||
lib | ||
misc | ||
po | ||
proc | ||
ps | ||
testsuite | ||
top | ||
.gitignore | ||
AUTHORS | ||
autogen.sh | ||
ChangeLog | ||
configure.ac | ||
COPYING | ||
COPYING.LIB | ||
free.1 | ||
free.c | ||
kill.1 | ||
Makefile.am | ||
NEWS | ||
pgrep.1 | ||
pgrep.c | ||
pkill.1 | ||
pmap.1 | ||
pmap.c | ||
pwdx.1 | ||
pwdx.c | ||
README | ||
skill.1 | ||
skill.c | ||
slabtop.1 | ||
slabtop.c | ||
snice.1 | ||
sysctl.8 | ||
sysctl.c | ||
sysctl.conf | ||
sysctl.conf.5 | ||
tload.1 | ||
tload.c | ||
uptime.1 | ||
uptime.c | ||
vmstat.8 | ||
vmstat.c | ||
w.1 | ||
w.c | ||
watch.1 | ||
watch.c |
COMPATIBILITY This code is intended for use with Linux 2.6.xx, 3.x and hopefully all future kernels. INSTALLATION If you are using git version of the project you need extra step. ./autogen.sh After that, and everyone using .tar.xz version of procps-ng, can do normal build. Read './configure --help' to select options for your needs. ./configure make make install If you have DejaGNU installed you can run optional test suite. make check HOW TO CONTRIBUTE See Documentation/BUGS file. PACKAGING If you are a downstream maintainer (packager) for a Linux distribution, please avoid causing troubles. This section applies to you. Avoid maintaining distribution specific patches. Send your patches to upstream, where they are at least reviewed, if not included. Please forward bug reports. If your bug database is public and busy enough to bother with, please make this known. Follow Debian's lead in making the bug database easy to comment on via email without need for an account. For normal packages, ensure that you do not add debugging flags to the CFLAGS variable. UPSTREAM & BUG REPORTS procps-ng <procps@freelists.org>