sigwait(2) and sigtimedwait(2) must not be restarted.
(cherry picked from commit afb36e289c1d96053b6063b0e548fc7d31dbd239)