Commit 9f59ce5d authored by Chuck Ebbert's avatar Chuck Ebbert Committed by Linus Torvalds
Browse files

[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
Signed-off-by: default avatarChuck Ebbert <>
Cc: Daniel Jacobowitz <>
Cc: Albert Cahalan <>
Cc: Roland McGrath <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent f9abd1ac
......@@ -1387,8 +1387,10 @@ long do_fork(unsigned long clone_flags,
if (clone_flags & CLONE_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 {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment