diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2021-04-06 21:26:33 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2021-04-06 21:26:33 +0200 |
commit | caa78917b68a9f5cff65b22e0e53ebd53b2dc5c7 (patch) | |
tree | 2082f6e332d368b5aacca5e3ed3f98adba89f4b4 | |
parent | 8bb5161fe3bdccbe94482715b71dd26d6d3e79e3 (diff) | |
download | newlib-caa78917b68a9f5cff65b22e0e53ebd53b2dc5c7.zip newlib-caa78917b68a9f5cff65b22e0e53ebd53b2dc5c7.tar.gz newlib-caa78917b68a9f5cff65b22e0e53ebd53b2dc5c7.tar.bz2 |
Cygwin: select: don't set ready for exception on socket shutdown
So far select wrongly sets the descriptor as ready for exception
when a shutdown occurs. This is entirely non-standard. Only set
this bit on an out-of-band event.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/select.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 6e8586d..956cd9b 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1920,10 +1920,7 @@ fhandler_socket_wsock::select_write (select_stuff *ss) s->write_ready = saw_shutdown_write () || connect_state () == unconnected; s->write_selected = true; if (connect_state () != unconnected) - { - s->except_ready = saw_shutdown_write () || saw_shutdown_read (); - s->except_on_write = true; - } + s->except_on_write = true; return s; } @@ -1938,8 +1935,6 @@ fhandler_socket_wsock::select_except (select_stuff *ss) s->cleanup = socket_cleanup; } s->peek = peek_socket; - /* FIXME: Is this right? Should these be used as criteria for except? */ - s->except_ready = saw_shutdown_write () || saw_shutdown_read (); s->except_selected = true; return s; } |