提交 d92fcf05 编写于 作者: O Oleg Nesterov

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: NOleg Nesterov <oleg@redhat.com>
上级 0666fb51
......@@ -3023,8 +3023,10 @@ SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler)
SYSCALL_DEFINE0(pause)
{
current->state = TASK_INTERRUPTIBLE;
schedule();
while (!signal_pending(current)) {
current->state = TASK_INTERRUPTIBLE;
schedule();
}
return -ERESTARTNOHAND;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册