]> granicus.if.org Git - procps-ng/commit
top: preserve current screen when receiving a SIGWINCH
authorJim Warner <james.warner@comcast.net>
Wed, 16 Jan 2013 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@enc.com.au>
Thu, 24 Jan 2013 10:29:23 +0000 (21:29 +1100)
commitba9092ad83d37d9eb91ded49380a9bedeba4bac6
tree708a41637bb10cb5b4b20aada2def39e66f6e828
parent5856919e83791ba62859aa61c18939b2527cf97a
top: preserve current screen when receiving a SIGWINCH

Prior to this commit, top has always taken the easiest
(safest?) approach when dealing with those troublesome
SIGWINCH interrupts. Whenever the user was on a screen
other than the main display, any signal received would
force an immediate exit, returning to the main screen.

With these changes, top will retain the user's current
position regardless of what screen he/she was viewing.

In support the following additional changes were made:
* the initial help screen requires an explicit end key
` not 'any other key' formerly used to request an exit
* the colors mapping screen instructions were improved
* ^Z response was made immediate, eliminating the flag
* the sigaction's SA_RESTART flag had to be eliminated
* sigprocmask logic was normailize to the bare minimum
* the POSIX.1-2004 async-signal safe functions used in
` the signal handlers were acknowledged and documented

(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/unwanted-topinspect-window-enclosure-with-the-terminal-size-change

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c
top/top.h
top/top_nls.c
top/top_nls.h