diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2020-04-01 19:22:09 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2020-04-01 19:22:09 +0000 |
| commit | 59838c1a1979924f3904536f2e6d5a771e185c14 (patch) | |
| tree | ce7764a4aa67665a70f2079c297f21e0d1225c33 /sys/i386 | |
| parent | 02cb5b4be86ed9827ddd8c39df5f48e6925c66d8 (diff) | |
Notes
Diffstat (limited to 'sys/i386')
| -rw-r--r-- | sys/i386/i386/trap.c | 1 | ||||
| -rw-r--r-- | sys/i386/i386/vm_machdep.c | 13 |
2 files changed, 4 insertions, 10 deletions
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 54b28b80ef7f5..ccf16bf009cdd 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include <sys/bus.h> #include <sys/systm.h> #include <sys/proc.h> -#include <sys/pioctl.h> #include <sys/ptrace.h> #include <sys/kdb.h> #include <sys/kernel.h> diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 62c7a62486417..a25c33b34d34a 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/mutex.h> -#include <sys/pioctl.h> #include <sys/proc.h> #include <sys/sysent.h> #include <sys/sf_buf.h> @@ -208,15 +207,11 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) td2->td_frame->tf_edx = 1; /* - * If the parent process has the trap bit set (i.e. a debugger had - * single stepped the process to the system call), we need to clear - * the trap flag from the new frame unless the debugger had set PF_FORK - * on the parent. Otherwise, the child will receive a (likely - * unexpected) SIGTRAP when it executes the first instruction after - * returning to userland. + * If the parent process has the trap bit set (i.e. a debugger + * had single stepped the process to the system call), we need + * to clear the trap flag from the new frame. */ - if ((p1->p_pfsflags & PF_FORK) == 0) - td2->td_frame->tf_eflags &= ~PSL_T; + td2->td_frame->tf_eflags &= ~PSL_T; /* * Set registers for trampoline to user mode. Leave space for the |
