https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d9c1aeaddf51a25ba357685dca7b1247b577b07e

commit d9c1aeaddf51a25ba357685dca7b1247b577b07e
Author: Ken Brown <[email protected]>
Date:   Thu Nov 11 10:22:41 2021 -0500

    Cygwin: fhandler_pipe::raw_read: minor code cleanup
    
    Remove references to STATUS_THREAD_SIGNALED and
    STATUS_THREAD_CANCELED, which can't occur any more.

Diff:
---
 winsup/cygwin/fhandler_pipe.cc | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/winsup/cygwin/fhandler_pipe.cc b/winsup/cygwin/fhandler_pipe.cc
index 40fb2349a..ba6b70f55 100644
--- a/winsup/cygwin/fhandler_pipe.cc
+++ b/winsup/cygwin/fhandler_pipe.cc
@@ -332,10 +332,7 @@ fhandler_pipe::raw_read (void *ptr, size_t& len)
          set_errno (EBADF);
          nbytes = (size_t) -1;
        }
-      else if (NT_SUCCESS (status)
-              || status == STATUS_BUFFER_OVERFLOW
-              || status == STATUS_THREAD_CANCELED
-              || status == STATUS_THREAD_SIGNALED)
+      else if (NT_SUCCESS (status) || status == STATUS_BUFFER_OVERFLOW)
        {
          nbytes_now = io.Information;
          ptr = ((char *) ptr) + nbytes_now;
@@ -384,13 +381,6 @@ fhandler_pipe::raw_read (void *ptr, size_t& len)
        break;
     }
   ReleaseMutex (read_mtx);
-  if (status == STATUS_THREAD_SIGNALED && nbytes == 0)
-    {
-      set_errno (EINTR);
-      nbytes = (size_t) -1;
-    }
-  else if (status == STATUS_THREAD_CANCELED)
-    pthread::static_cancel_self ();
   len = nbytes;
 }

Reply via email to