mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-03 21:45:51 +08:00
Cygwin: signalfd: drop incorrect handling of EINTR in read(2)
In case sigwait_common returns EINTR, read wrongly ignores it, so read can't be interrupt by a signal. Fix that. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
837eb2af5b
commit
704068e4f9
@ -112,13 +112,11 @@ fhandler_signalfd::read (void *ptr, size_t& len)
|
||||
? (PLARGE_INTEGER) &poll : NULL);
|
||||
if (ret == -1)
|
||||
{
|
||||
if (curlen == 0)
|
||||
{
|
||||
if (get_errno () == EINTR && curlen == 0)
|
||||
continue;
|
||||
set_errno (old_errno);
|
||||
}
|
||||
len = curlen ?: (size_t) -1;
|
||||
/* If we already read a signal so the buffer isn't empty, just
|
||||
return success. */
|
||||
if (curlen > 0)
|
||||
break;
|
||||
len = -1;
|
||||
return;
|
||||
}
|
||||
__try
|
||||
|
Loading…
x
Reference in New Issue
Block a user