Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit c0c9575

Browse files
committed
(toggle_subshell): fix possible race condition on SIGWINCH handling.
If a SIGWINCH were handled after setting was_sigwinch to 0 but before flushing the pipe, the SIGWINCH would be missed. Fix that using return value of tty_flush_winch(). Thanks Michael Gold <michael@bitplane.org>. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
1 parent 81f3331 commit c0c9575

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/execute.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,7 @@ toggle_subshell (void)
547547
* Save sigwinch flag that will be reset in mc_refresh() called via update_panels().
548548
* There is some problem with screen redraw in ncurses-based mc in this situation.
549549
*/
550-
was_sigwinch = tty_got_winch ();
551-
tty_flush_winch ();
550+
was_sigwinch = tty_flush_winch ();
552551

553552
#ifdef ENABLE_SUBSHELL
554553
if (mc_global.tty.use_subshell)

0 commit comments

Comments
 (0)