truss: follow pdfork()ed descendents with -f
PR: 201276 Reported by: David Drysdale Reviewed by: oshogbo MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2976
This commit is contained in:
parent
119b75925c
commit
6df1985625
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=285842
@ -158,6 +158,7 @@ amd64_syscall_entry(struct trussinfo *trussinfo, int nargs)
|
||||
|
||||
if (fsc->name && (trussinfo->flags & FOLLOWFORKS) &&
|
||||
(strcmp(fsc->name, "fork") == 0 ||
|
||||
strcmp(fsc->name, "pdfork") == 0 ||
|
||||
strcmp(fsc->name, "rfork") == 0 ||
|
||||
strcmp(fsc->name, "vfork") == 0))
|
||||
trussinfo->curthread->in_fork = 1;
|
||||
|
@ -165,6 +165,7 @@ amd64_fbsd32_syscall_entry(struct trussinfo *trussinfo, int nargs)
|
||||
|
||||
if (fsc->name && (trussinfo->flags & FOLLOWFORKS) &&
|
||||
(strcmp(fsc->name, "fork") == 0 ||
|
||||
strcmp(fsc->name, "pdfork") == 0 ||
|
||||
strcmp(fsc->name, "rfork") == 0 ||
|
||||
strcmp(fsc->name, "vfork") == 0))
|
||||
trussinfo->curthread->in_fork = 1;
|
||||
|
@ -172,6 +172,7 @@ arm_syscall_entry(struct trussinfo *trussinfo, int nargs)
|
||||
|
||||
if (fsc->name && (trussinfo->flags & FOLLOWFORKS) &&
|
||||
(strcmp(fsc->name, "fork") == 0 ||
|
||||
strcmp(fsc->name, "pdfork") == 0 ||
|
||||
strcmp(fsc->name, "rfork") == 0 ||
|
||||
strcmp(fsc->name, "vfork") == 0))
|
||||
trussinfo->curthread->in_fork = 1;
|
||||
|
@ -162,6 +162,7 @@ i386_syscall_entry(struct trussinfo *trussinfo, int nargs)
|
||||
|
||||
if (fsc->name && (trussinfo->flags & FOLLOWFORKS) &&
|
||||
(strcmp(fsc->name, "fork") == 0 ||
|
||||
strcmp(fsc->name, "pdfork") == 0 ||
|
||||
strcmp(fsc->name, "rfork") == 0 ||
|
||||
strcmp(fsc->name, "vfork") == 0))
|
||||
trussinfo->curthread->in_fork = 1;
|
||||
|
@ -155,6 +155,7 @@ mips_syscall_entry(struct trussinfo *trussinfo, int nargs)
|
||||
|
||||
if (fsc->name && (trussinfo->flags & FOLLOWFORKS) &&
|
||||
(strcmp(fsc->name, "fork") == 0 ||
|
||||
strcmp(fsc->name, "pdfork") == 0 ||
|
||||
strcmp(fsc->name, "rfork") == 0 ||
|
||||
strcmp(fsc->name, "vfork") == 0))
|
||||
trussinfo->curthread->in_fork = 1;
|
||||
|
@ -169,6 +169,7 @@ powerpc_syscall_entry(struct trussinfo *trussinfo, int nargs)
|
||||
|
||||
if (fsc->name && (trussinfo->flags & FOLLOWFORKS) &&
|
||||
(strcmp(fsc->name, "fork") == 0 ||
|
||||
strcmp(fsc->name, "pdfork") == 0 ||
|
||||
strcmp(fsc->name, "rfork") == 0 ||
|
||||
strcmp(fsc->name, "vfork") == 0))
|
||||
trussinfo->curthread->in_fork = 1;
|
||||
|
@ -157,6 +157,7 @@ powerpc64_syscall_entry(struct trussinfo *trussinfo, int nargs)
|
||||
|
||||
if (fsc->name && (trussinfo->flags & FOLLOWFORKS) &&
|
||||
(strcmp(fsc->name, "fork") == 0 ||
|
||||
strcmp(fsc->name, "pdfork") == 0 ||
|
||||
strcmp(fsc->name, "rfork") == 0 ||
|
||||
strcmp(fsc->name, "vfork") == 0))
|
||||
trussinfo->curthread->in_fork = 1;
|
||||
|
@ -161,6 +161,7 @@ sparc64_syscall_entry(struct trussinfo *trussinfo, int nargs)
|
||||
|
||||
if (fsc->name && (trussinfo->flags & FOLLOWFORKS) &&
|
||||
(strcmp(fsc->name, "fork") == 0 ||
|
||||
strcmp(fsc->name, "pdfork") == 0 ||
|
||||
strcmp(fsc->name, "rfork") == 0 ||
|
||||
strcmp(fsc->name, "vfork") == 0))
|
||||
trussinfo->curthread->in_fork = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user