summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2010-07-26 01:56:27 +0000
committerguenther <guenther@openbsd.org>2010-07-26 01:56:27 +0000
commit207e4b38a785bf665de26471f4fc5fde67fa99f0 (patch)
tree5b61a93df6c22438e6a0955afca220cb2f2207a0 /sys/kern/kern_exec.c
parentAdd missing braces so a loop will function as intended. (diff)
downloadwireguard-openbsd-207e4b38a785bf665de26471f4fc5fde67fa99f0.tar.xz
wireguard-openbsd-207e4b38a785bf665de26471f4fc5fde67fa99f0.zip
Correct the links between threads, processes, pgrps, and sessions,
so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 3bd0efe326e..5afdacd42d9 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.112 2010/05/18 22:26:10 tedu Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.113 2010/07/26 01:56:27 guenther Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -468,9 +468,9 @@ sys_execve(struct proc *p, void *v, register_t *retval)
p->p_textvp = pack.ep_vp;
atomic_setbits_int(&p->p_flag, P_EXEC);
- if (p->p_flag & P_PPWAIT) {
- atomic_clearbits_int(&p->p_flag, P_PPWAIT);
- wakeup((caddr_t)p->p_pptr);
+ if (p->p_p->ps_mainproc->p_flag & P_PPWAIT) {
+ atomic_clearbits_int(&p->p_p->ps_mainproc->p_flag, P_PPWAIT);
+ wakeup(p->p_p->ps_pptr);
}
/*