signal handler. Otherwise, a restarted system call that gets
interrupted before the restart has taken effect by _another_
signal will potentially restart the wrong system call.
ka = ¤t->sighand->action[signr - 1];
+ /* Always make any pending restarted system calls return -EINTR */
+ current_thread_info()->restart_block.fn = do_no_restart_syscall;
+
if (restart) {
switch (errno) {
case ERESTART_RESTARTBLOCK:
- current_thread_info()->restart_block.fn = do_no_restart_syscall;
case ERESTARTNOHAND:
scr->pt.r8 = ERR_CODE(EINTR);
/* note: scr->pt.r10 is already -1 */