summaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorChuck Ebbert <76306.1226@compuserve.com>2006-08-05 12:14:11 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-08-06 08:57:46 -0700
commit9f59ce5d0e0dd837853385927b150f5cef3a7f52 (patch)
tree12d158ca678e803e77803cd9476fd6104e8ae0c0 /kernel/fork.c
parentf9abd1ace43d6186268856dbec2ebf411218d6ca (diff)
downloadkernel-crypto-9f59ce5d0e0dd837853385927b150f5cef3a7f52.tar.gz
kernel-crypto-9f59ce5d0e0dd837853385927b150f5cef3a7f52.tar.xz
kernel-crypto-9f59ce5d0e0dd837853385927b150f5cef3a7f52.zip
[PATCH] ptrace: make pid of child process available for PTRACE_EVENT_VFORK_DONE
When delivering PTRACE_EVENT_VFORK_DONE, provide pid of the child process when tracer calls ptrace(PTRACE_GETEVENTMSG). This is already (accidentally) available when the tracer is tracing VFORK in addition to VFORK_DONE. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Cc: Daniel Jacobowitz <dan@debian.org> Cc: Albert Cahalan <acahalan@gmail.com> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 1b0f7b1e088..aa36c43783c 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1387,8 +1387,10 @@ long do_fork(unsigned long clone_flags,
if (clone_flags & CLONE_VFORK) {
wait_for_completion(&vfork);
- if (unlikely (current->ptrace & PT_TRACE_VFORK_DONE))
+ if (unlikely (current->ptrace & PT_TRACE_VFORK_DONE)) {
+ current->ptrace_message = nr;
ptrace_notify ((PTRACE_EVENT_VFORK_DONE << 8) | SIGTRAP);
+ }
}
} else {
free_pid(pid);