Skip to content
  • jim warner's avatar
    top: avoid any potential race involving 'BREAK_screen' <=== port of newlib 3e5016c2 · e81b58be
    jim warner authored and Craig Small's avatar Craig Small committed
    
    
    ______________________________ original newlib message
    ----------------------------------- ( minus git hash )
    
    When that 'Bottom' window was being finalized, an enum
    of BREAK_screen was added to the Frames_signal values.
    This was done so some full screen replacement function
    could flag the need for that bottom window to go away.
    
    Around that same time, top was made more responsive to
    keyboard input so that residual portions of a previous
    bottom window would not linger until the next refresh.
    This happened if going from a larger (^N, environment)
    bottom window to some smaller window (^P, namespaces).
    
    The combined effect of these changes was to create the
    potential race condition this commit addresses. If the
    user encountered a SIGWINCH while on any of those full
    screen replacement displays (help, fields mgmt, etc.),
    endless redraws would occur. A ^C was the only option.
    
    Henceforth we will protect against any redraw loops by
    clearing Frames_signal each time a redraw is required.
    
    [ along the way, we'll make the 'q' key work on that ]
    t secondary 'windows' help screen as it should, even ]
    [ though it is not documented on that screen itself. ]
    
    Reference(s):
    . May, 2022 - more responsive to keyboard input
    commit ........................................
    . May, 2022 - maybe force the bottom window off
    commit ........................................
    
    Signed-off-by: default avatarJim Warner <james.warner@comcast.net>
    e81b58be