* [PATCH] Cygwin: console: Abort read() on SIGWINCH if SA_RESTART is not set.
@ 2021-02-14 8:52 Takashi Yano
0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2021-02-14 8:52 UTC (permalink / raw)
To: cygwin-patches
- Currently, console read() keeps reading after SIGWINCH is sent
even if SA_RESTART flag is not set. With this patch, read()
returns EINTR on SIGWINCH if SA_RESTART flag is not set.
---
winsup/cygwin/fhandler_console.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 3c0783575..bdd6e5bb6 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -591,7 +591,9 @@ wait_retry:
continue;
case input_winch:
release_input_mutex ();
- continue;
+ if (global_sigs[SIGWINCH].sa_flags & SA_RESTART)
+ continue;
+ goto sig_exit;
default:
/* Should not come here */
release_input_mutex ();
--
2.30.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-14 8:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-14 8:52 [PATCH] Cygwin: console: Abort read() on SIGWINCH if SA_RESTART is not set Takashi Yano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).