diff options
author | John Baldwin <jhb@FreeBSD.org> | 2016-07-18 14:53:55 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2016-07-18 14:53:55 +0000 |
commit | fc4f075a1ace0a14602ee2bd3f0e808ca194260e (patch) | |
tree | eace14a1c813d7d3839130b326862ba3ba3a9b25 /sys/sys/proc.h | |
parent | d0cefbdc0d9861d88d0282fba68ed7416a14ac3f (diff) | |
download | src-fc4f075a1ace0a14602ee2bd3f0e808ca194260e.tar.gz src-fc4f075a1ace0a14602ee2bd3f0e808ca194260e.zip |
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.
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D7045
Notes
Notes:
svn path=/head/; revision=303001
Diffstat (limited to 'sys/sys/proc.h')
-rw-r--r-- | sys/sys/proc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 0cde084f8f99..b80ddf03eb1b 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -422,6 +422,7 @@ do { \ #define TDB_CHILD 0x00000100 /* New child indicator for ptrace() */ #define TDB_BORN 0x00000200 /* New LWP indicator for ptrace() */ #define TDB_EXIT 0x00000400 /* Exiting LWP indicator for ptrace() */ +#define TDB_VFORK 0x00000800 /* vfork indicator for ptrace() */ /* * "Private" flags kept in td_pflags: |