projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0666fb5
)
signal: sys_pause() should check signal_pending()
author
Oleg Nesterov
<oleg@redhat.com>
Wed, 25 May 2011 17:22:27 +0000
(19:22 +0200)
committer
Oleg Nesterov
<oleg@redhat.com>
Wed, 25 May 2011 17:22:27 +0000
(19:22 +0200)
ERESTART* is always wrong without TIF_SIGPENDING. Teach sys_pause()
to handle the spurious wakeup correctly.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
kernel/signal.c
patch
|
blob
|
history
diff --git
a/kernel/signal.c
b/kernel/signal.c
index ad5e818baacc43fb5e4046926bf52dde55acacfa..86c32b884f8efbb8f071b6343b3c37667b4e8fa3 100644
(file)
--- a/
kernel/signal.c
+++ b/
kernel/signal.c
@@
-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;
}