mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[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>
This commit is contained in:
parent
f9abd1ace4
commit
9f59ce5d0e
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue