diff options
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index bf09ff8..bf8f6fb 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -51,6 +51,7 @@ #include <sys/malloc.h> #include <sys/mutex.h> #include <sys/proc.h> +#include <sys/pioctl.h> #include <sys/resourcevar.h> #include <sys/syscall.h> #include <sys/vnode.h> @@ -758,6 +759,15 @@ again: PROC_UNLOCK(p2); /* + * If PF_FORK is set, the child process inherits the + * procfs ioctl flags from its parent. + */ + if (p1->p_pfsflags & PF_FORK) { + p2->p_stops = p1->p_stops; + p2->p_pfsflags = p1->p_pfsflags; + } + + /* * Return child proc pointer to parent. */ *procp = p2; |