diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 16133bd09c6f..7a8a1ee15800 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.439 2017/01/06 22:42:58 kamil Exp $ */ +/* $NetBSD: kern_exec.c,v 1.440 2017/01/09 00:31:30 kamil Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.439 2017/01/06 22:42:58 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.440 2017/01/09 00:31:30 kamil Exp $"); #include "opt_exec.h" #include "opt_execfmt.h" @@ -1235,26 +1235,11 @@ execve_runproc(struct lwp *l, struct execve_data * restrict data, * exited and exec()/exit() are the only places it will be cleared. */ if ((p->p_lflag & PL_PPWAIT) != 0) { -#if 0 - lwp_t *lp; - - mutex_enter(proc_lock); - lp = p->p_vforklwp; - p->p_vforklwp = NULL; - - l->l_lwpctl = NULL; /* was on loan from blocked parent */ - p->p_lflag &= ~PL_PPWAIT; - - lp->l_pflag &= ~LP_VFORKWAIT; /* XXX */ - cv_broadcast(&lp->l_waitcv); - mutex_exit(proc_lock); -#else mutex_enter(proc_lock); l->l_lwpctl = NULL; /* was on loan from blocked parent */ p->p_lflag &= ~PL_PPWAIT; cv_broadcast(&p->p_pptr->p_waitcv); mutex_exit(proc_lock); -#endif } error = credexec(l, &data->ed_attr); diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 2123bf6bb81f..76b5c2aa23f4 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exit.c,v 1.267 2016/11/13 15:25:01 christos Exp $ */ +/* $NetBSD: kern_exit.c,v 1.268 2017/01/09 00:31:30 kamil Exp $ */ /*- * Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.267 2016/11/13 15:25:01 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.268 2017/01/09 00:31:30 kamil Exp $"); #include "opt_ktrace.h" #include "opt_dtrace.h" @@ -343,21 +343,9 @@ exit1(struct lwp *l, int exitcode, int signo) */ mutex_enter(proc_lock); if (p->p_lflag & PL_PPWAIT) { -#if 0 - lwp_t *lp; - - l->l_lwpctl = NULL; /* was on loan from blocked parent */ - p->p_lflag &= ~PL_PPWAIT; - - lp = p->p_vforklwp; - p->p_vforklwp = NULL; - lp->l_pflag &= ~LP_VFORKWAIT; /* XXX */ - cv_broadcast(&lp->l_waitcv); -#else l->l_lwpctl = NULL; /* was on loan from blocked parent */ p->p_lflag &= ~PL_PPWAIT; cv_broadcast(&p->p_pptr->p_waitcv); -#endif } if (SESS_LEADER(p)) { diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 0168918e6ead..92d65503c6ca 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_fork.c,v 1.196 2016/11/04 18:14:04 christos Exp $ */ +/* $NetBSD: kern_fork.c,v 1.197 2017/01/09 00:31:30 kamil Exp $ */ /*- * Copyright (c) 1999, 2001, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.196 2016/11/04 18:14:04 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.197 2017/01/09 00:31:30 kamil Exp $"); #include "opt_ktrace.h" #include "opt_dtrace.h" @@ -570,14 +570,8 @@ fork1(struct lwp *l1, int flags, int exitsig, void *stack, size_t stacksize, * Preserve synchronization semantics of vfork. If waiting for * child to exec or exit, sleep until it clears LP_VFORKWAIT. */ -#if 0 - while (l1->l_pflag & LP_VFORKWAIT) { - cv_wait(&l1->l_waitcv, proc_lock); - } -#else while (p2->p_lflag & PL_PPWAIT) cv_wait(&p1->p_waitcv, proc_lock); -#endif /* * Let the parent know that we are tracing its child.