Skip to content

Commit

Permalink
Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/oleg/misc

* 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc:
  signal: sys_pause() should check signal_pending()
  ptrace: ptrace_resume() shouldn't wake up !TASK_TRACED thread
  • Loading branch information
torvalds committed May 25, 2011
2 parents 0c63e38 + d92fcf0 commit 9720d75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ static int ptrace_resume(struct task_struct *child, long request,
}

child->exit_code = data;
wake_up_process(child);
wake_up_state(child, __TASK_TRACED);

return 0;
}
Expand Down
6 changes: 4 additions & 2 deletions kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9720d75

Please sign in to comment.