Cleanup dead code after revert of racy vfork(2) commit
This removes dead code introduced with the following commit: date: 2012-07-27 22:52:49 +0200; author: christos; state: Exp; lines: +8 -2; revert racy vfork() parent-blocking-before-child-execs-or-exits code. ok rmind
This commit is contained in:
parent
c1fd63d8fb
commit
e6f79d077f
@ -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 <sys/cdefs.h>
|
||||
__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);
|
||||
|
@ -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 <sys/cdefs.h>
|
||||
__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)) {
|
||||
|
@ -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 <sys/cdefs.h>
|
||||
__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.
|
||||
|
Loading…
Reference in New Issue
Block a user