From 674b4fe995d28a140cd2f1fec856d27b53ea62a9 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Thu, 9 May 2019 10:41:41 -0400 Subject: [PATCH] Revert "Cygwin: check for STATUS_PENDING in fhandler_base::raw_read" This reverts commit 10bf30bebf7feebbc3e376cbcac62a242cc240f3. It was made because an incorrect implementation of duplex FIFOs. --- winsup/cygwin/fhandler.cc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index a0c3dcce2..b0c9c50c3 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -215,23 +215,11 @@ fhandler_base::raw_read (void *ptr, size_t& len) NTSTATUS status; IO_STATUS_BLOCK io; int try_noreserve = 1; - DWORD waitret = WAIT_OBJECT_0; retry: status = NtReadFile (get_handle (), NULL, NULL, NULL, &io, ptr, len, NULL, NULL); - if (status == STATUS_PENDING) - { - waitret = cygwait (get_handle (), cw_infinite, - cw_cancel | cw_sig_eintr); - if (waitret == WAIT_OBJECT_0) - status = io.Status; - } - if (waitret == WAIT_CANCELED) - pthread::static_cancel_self (); - else if (waitret == WAIT_SIGNALED) - set_errno (EINTR); - else if (NT_SUCCESS (status)) + if (NT_SUCCESS (status)) len = io.Information; else {