Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106210
b: refs/heads/master
c: daded34
h: refs/heads/master
v: v3
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Jul 26, 2008
1 parent 6fbacc5 commit ad1029e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 09a05394fe2448a4139b014936330af23fa7ec83
refs/heads/master: daded34be96b1975ff8539ff62ad8b158ce7d842
18 changes: 18 additions & 0 deletions trunk/include/linux/tracehook.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,22 @@ static inline void tracehook_report_clone_complete(int trace,
ptrace_event(0, trace, pid);
}

/**
* tracehook_report_vfork_done - vfork parent's child has exited or exec'd
* @child: child task, already running
* @pid: new child's PID in the parent's namespace
*
* Called after a %CLONE_VFORK parent has waited for the child to complete.
* The clone/vfork system call will return immediately after this.
* The @child pointer may be invalid if a self-reaping child died and
* tracehook_report_clone() took no action to prevent it from self-reaping.
*
* Called with no locks held.
*/
static inline void tracehook_report_vfork_done(struct task_struct *child,
pid_t pid)
{
ptrace_event(PT_TRACE_VFORK_DONE, PTRACE_EVENT_VFORK_DONE, pid);
}

#endif /* <linux/tracehook.h> */
5 changes: 1 addition & 4 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1414,10 +1414,7 @@ long do_fork(unsigned long clone_flags,
freezer_do_not_count();
wait_for_completion(&vfork);
freezer_count();
if (unlikely (current->ptrace & PT_TRACE_VFORK_DONE)) {
current->ptrace_message = nr;
ptrace_notify ((PTRACE_EVENT_VFORK_DONE << 8) | SIGTRAP);
}
tracehook_report_vfork_done(p, nr);
}
} else {
nr = PTR_ERR(p);
Expand Down

0 comments on commit ad1029e

Please sign in to comment.