Cygwin: console: Fix the condition to interrupt select() by SIGWINCH

- Add code so that select() is not interrupted by SIGWINCH if it is
  ignored (SIG_IGN or SIG_DFL).
This commit is contained in:
Takashi Yano 2019-08-15 14:03:00 +09:00 committed by Corinna Vinschen
parent e6910dfff6
commit 3a929f27f8
1 changed files with 3 additions and 1 deletions

View File

@ -1045,7 +1045,9 @@ peek_console (select_record *me, bool)
else if (!PeekConsoleInputW (h, &irec, 1, &events_read) || !events_read)
break;
fh->acquire_input_mutex (INFINITE);
if (fhandler_console::input_winch == fh->process_input_message ())
if (fhandler_console::input_winch == fh->process_input_message ()
&& global_sigs[SIGWINCH].sa_handler != SIG_IGN
&& global_sigs[SIGWINCH].sa_handler != SIG_DFL)
{
set_sig_errno (EINTR);
fh->release_input_mutex ();