]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: select: don't set ready for exception on socket shutdown
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 6 Apr 2021 19:26:33 +0000 (21:26 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 6 Apr 2021 19:26:33 +0000 (21:26 +0200)
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>
winsup/cygwin/select.cc

index 6e8586d17e80eaf1c0b0632fd1646dbb336389b2..956cd9bc125d01a314357782a817255c0fdcf6f6 100644 (file)
@@ -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;
 }
This page took 0.036316 seconds and 5 git commands to generate.