shift "ptrace implies WUNTRACED" from ptrace_do_wait() to wait_task_stopped()
commit47918025efdabd34e96b13b26eb2cf2fd6fd1f7c
authorOleg Nesterov <oleg@redhat.com>
Wed, 17 Jun 2009 23:27:39 +0000 (17 16:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Jun 2009 20:03:52 +0000 (18 13:03 -0700)
treebae081deabe6e955e94c5510ae408b50b930c225
parent3b34fc5880a2dcc7e5ed9837ef8d6bae051ab266
shift "ptrace implies WUNTRACED" from ptrace_do_wait() to wait_task_stopped()

No functional changes, preparation for the next patch.

ptrace_do_wait() adds WUNTRACED to options for wait_task_stopped() which
should always accept the stopped tracee, even if do_wait() was called
without WUNTRACED.

Change wait_task_stopped() to check "ptrace || WUNTRACED" instead.  This
makes the code more explicit, and "int options" argument becomes const in
do_wait() pathes.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/exit.c