mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
poll: fix ppoll signal masking
This commit is contained in:
@@ -134,10 +134,15 @@ syscallret_t syscall_ppoll(context_t *context, pollfd_t *fds, size_t nfds, times
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
signal_changemask(current_thread(), SIG_SETMASK, &sigset, &savedset);
|
signal_changemask(current_thread(), SIG_SETMASK, &sigset, &savedset);
|
||||||
signal_returnmask(current_thread(), &savedset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
syscallret_t ret = syscall_poll(context, fds, nfds, utimeout ? (timeout.s * 1000 + timeout.ns / 1000000) : -1);
|
syscallret_t ret = syscall_poll(context, fds, nfds, utimeout ? (timeout.s * 1000 + timeout.ns / 1000000) : -1);
|
||||||
|
if (usigset) {
|
||||||
|
if (ret.errno == EINTR)
|
||||||
|
signal_returnmask(current_thread(), &savedset);
|
||||||
|
else
|
||||||
|
signal_changemask(current_thread(), SIG_SETMASK, &savedset, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user