diff options
author | Jim Warner <james.warner@comcast.net> | 2022-07-27 00:00:00 -0500 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2022-07-27 21:19:37 +1000 |
commit | ad4429ade07abe2133dd53341fa91639625f09a0 (patch) | |
tree | 96ca5950fe475f8520cb9bd9fa943a5fb0f8aa42 /watch.c | |
parent | 5d338b18e7da073a07e64aabd498548173223b05 (diff) | |
download | procps-ng-ad4429ade07abe2133dd53341fa91639625f09a0.tar.gz |
top: eliminate a potential abend when exiting 'A' mode <=== port of newlib 80e2a7a6
______________________________ original newlib message
----------------------------------- ( minus git hash )
In that issue cited below, Tyson Nottingham identified
a potential abend which was associated with 'alternate
display mode' plus that troublesome 'mkVIZrow1' macro.
He also offered a perfectly adequate fix for that bug.
I refer to that macro as troublesome since it's now so
widely used and sometimes (by design) causes 'begtask'
to go negative (invalid). And now I found yet one more
place where it should have been used but wasn't ('f').
It's also troublesome as evidenced by some git history
listed below. Heck, there was even a commit addressing
the same symptoms (alternate display mode abend) which
Tyson suffered. Clearly, the current design is flawed.
So, with those two issues in mind, I've refactored the
approach to maintaining a visible task in the 1st row.
Henceforth, a 'mkVIZrow1' macro will be issued in only
two places: once at startup and after most keystrokes.
Such an approach likely results in additional calls to
the 'window_hlp' routine that aren't really necessary.
But, it provides a cleaner design less prone to errors
in the future. Besides, such additional overhead would
only be incurred when interacting with the user. Thus,
new costs are of no concern and will never be noticed.
Reference(s):
. Tyson Nottingham reported problem
https://gitlab.com/procps-ng/procps/-/issues/245
. Jun, 2018 - visible row 1 tasks first addressed
commit ........................................
. Jun, 2018 - adressed edge case, new bugs created
commit ........................................
. Sep, 2018 - additional edge case addressed
commit ........................................
. May, 2021 - some abends fixed, new error created
commit ........................................
. Jun, 2021 - try to prorect against future errors
commit ........................................
. Sep, 2021 - integrate mkVIZ & 'focused' tasks
commit ........................................
Discovered by: Tyson Nottingham
Signed-off-by: Jim Warner <james.warner@comcast.net>
Diffstat (limited to 'watch.c')
0 files changed, 0 insertions, 0 deletions