summaryrefslogtreecommitdiff
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-03-24 16:01:23 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-03-24 16:01:23 +0000
commitb85e9ba20c14a428d67fc578018fd8a539c89f7b (patch)
treeb40dafa9a5122b8fb1353291f58602e22cbd30a1 /sys/kern/kern_fork.c
parentbb009c4c0bea668c35c72a9601e752153bc19d8a (diff)
Kill the horrible hack of storing the pid in struct selinfo.
Instead, keep the proc pointer in it and put the selinfo on a list in struct proc in selrecord. Then clean up the list when leaving sys_select and sys_poll. miod@ ok, testing by many, including Bobs spamd boxes.
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index d19608d9cbc..da8d0df31c4 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.87 2007/03/15 10:22:30 art Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.88 2007/03/24 16:01:22 art Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -246,6 +246,8 @@ fork1(struct proc *p1, int exitsig, int flags, void *stack, size_t stacksize,
p2->p_cred->p_refcnt = 1;
crhold(p1->p_ucred);
+ TAILQ_INIT(&p2->p_selects);
+
/* bump references to the text vnode (for procfs) */
p2->p_textvp = p1->p_textvp;
if (p2->p_textvp)