diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2019-08-15 14:03:00 +0900 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-08-15 09:53:33 +0200 |
commit | 3a929f27f8c3c870eb61518c9c12bf1834f84558 (patch) | |
tree | 882c77d5ab0f028826064a2b5ca222e6332167a5 /winsup | |
parent | e6910dfff6914e6286ad09b5af30e28d9687c8e5 (diff) | |
download | newlib-3a929f27f8c3c870eb61518c9c12bf1834f84558.zip newlib-3a929f27f8c3c870eb61518c9c12bf1834f84558.tar.gz newlib-3a929f27f8c3c870eb61518c9c12bf1834f84558.tar.bz2 |
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).
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/select.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 9cf8928..4e9256b 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -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 (); |