Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d92fcf05 authored by Oleg Nesterov's avatar Oleg Nesterov
Browse files

signal: sys_pause() should check signal_pending()



ERESTART* is always wrong without TIF_SIGPENDING. Teach sys_pause()
to handle the spurious wakeup correctly.

Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
parent 0666fb51
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3023,8 +3023,10 @@ SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler)

SYSCALL_DEFINE0(pause)
{
	while (!signal_pending(current)) {
		current->state = TASK_INTERRUPTIBLE;
		schedule();
	}
	return -ERESTARTNOHAND;
}