]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 303001: Add PTRACE_VFORK to trace vfork events.
authorjhb <jhb@FreeBSD.org>
Fri, 19 Aug 2016 20:17:57 +0000 (20:17 +0000)
committerjhb <jhb@FreeBSD.org>
Fri, 19 Aug 2016 20:17:57 +0000 (20:17 +0000)
commit55e600d7fb35ccff5c2a024b2f3392ba31cf48ab
treecbecbc986582be3d6cd89eaffbb67fb7f39cc6c5
parent434d74d442c17b75001187964603fd65517dc77c
MFC 303001: Add PTRACE_VFORK to trace vfork events.

First, PL_FLAG_FORKED events now also set a PL_FLAG_VFORKED flag when
the new child was created via vfork() rather than fork().  Second, a
new PL_FLAG_VFORK_DONE event can now be enabled via the PTRACE_VFORK
event mask.  This new stop is reported after the vfork parent resumes
due to the child calling exit or exec.  Debuggers can use this stop to
reinsert breakpoints in the vfork parent process before it resumes.
lib/libc/sys/ptrace.2
sys/kern/kern_fork.c
sys/kern/subr_syscall.c
sys/kern/sys_process.c
sys/sys/proc.h
sys/sys/ptrace.h
tests/sys/kern/ptrace_test.c