Revert "Cygwin: check for STATUS_PENDING in fhandler_base::raw_read"

This reverts commit 10bf30bebf.  It was
made because an incorrect implementation of duplex FIFOs.
This commit is contained in:
Ken Brown 2019-05-09 10:41:41 -04:00
parent 1559faf0f2
commit e1d5be1783
1 changed files with 1 additions and 13 deletions

View File

@ -215,23 +215,11 @@ fhandler_base::raw_read (void *ptr, size_t& len)
NTSTATUS status; NTSTATUS status;
IO_STATUS_BLOCK io; IO_STATUS_BLOCK io;
int try_noreserve = 1; int try_noreserve = 1;
DWORD waitret = WAIT_OBJECT_0;
retry: retry:
status = NtReadFile (get_handle (), NULL, NULL, NULL, &io, ptr, len, status = NtReadFile (get_handle (), NULL, NULL, NULL, &io, ptr, len,
NULL, NULL); NULL, NULL);
if (status == STATUS_PENDING) if (NT_SUCCESS (status))
{
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))
len = io.Information; len = io.Information;
else else
{ {