summaryrefslogtreecommitdiff
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2010-06-29 20:14:47 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2010-06-29 20:14:47 +0000
commit5f668482a0ee7fdb423c438a5d51c31ab892ec1e (patch)
tree1f0a54a53da585e1f349df7fadab420f326bbcd0 /sys/kern/kern_fork.c
parentabdb9c7ff6417c26618514872b4bd4a27e71a1f6 (diff)
Eliminate struct plimit's PL_SHAREMOD flag: it was for COMPAT_IRIX
sproc() support, but we don't have COMPAT_IRIX. ok krw@ tedu@
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 5467a1710fb..4a1c23ba336 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.114 2010/06/29 00:35:28 tedu Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.115 2010/06/29 20:14:46 guenther Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -300,19 +300,9 @@ fork1(struct proc *p1, int exitsig, int flags, void *stack, size_t stacksize,
else
p2->p_fd = fdcopy(p1);
- /*
- * If ps_limit is still copy-on-write, bump refcnt,
- * otherwise get a copy that won't be modified.
- * (If PL_SHAREMOD is clear, the structure is shared
- * copy-on-write.)
- */
if ((flags & FORK_THREAD) == 0) {
- if (p1->p_p->ps_limit->p_lflags & PL_SHAREMOD)
- p2->p_p->ps_limit = limcopy(p1->p_p->ps_limit);
- else {
- p2->p_p->ps_limit = p1->p_p->ps_limit;
- p2->p_p->ps_limit->p_refcnt++;
- }
+ p2->p_p->ps_limit = p1->p_p->ps_limit;
+ p2->p_p->ps_limit->p_refcnt++;
}
if (p1->p_session->s_ttyvp != NULL && p1->p_flag & P_CONTROLT)