Cygwin: pipe: Handle WAIT_CANCELED when waiting read_mtx.

- Add missing handling for WAIT_CANCELED in cygwait() for read_mtx
  in raw_read().
This commit is contained in:
Takashi Yano 2021-11-10 12:24:53 +09:00
parent 975a808a56
commit 08253fae73
1 changed files with 9 additions and 1 deletions

View File

@ -302,10 +302,18 @@ fhandler_pipe::raw_read (void *ptr, size_t& len)
set_errno (EAGAIN);
len = (size_t) -1;
return;
default:
case WAIT_SIGNALED:
set_errno (EINTR);
len = (size_t) -1;
return;
case WAIT_CANCELED:
pthread::static_cancel_self ();
/* NOTREACHED */
default:
/* Should not reach here. */
__seterrno ();
len = (size_t) -1;
return;
}
while (nbytes < len)
{