summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-06-27 07:14:23 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-06-27 07:14:23 +0000
commit01774eec88fe9524f78ad3b591e72380bda7cbc2 (patch)
tree70aa101950db158418de12e6de60615dd53ef36a /sys
parentd9b0ec3aae572a6fc2adc68e67a1d1521e1ab3dc (diff)
no more fork braindamage
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_fork.c19
-rw-r--r--sys/vm/vm_extern.h6
2 files changed, 3 insertions, 22 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index c194543523b..1c1e43c03c3 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.41 2001/06/27 06:21:28 art Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.42 2001/06/27 07:14:22 art Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -349,28 +349,13 @@ again:
p2->p_addr = (struct user *)uaddr;
-#ifdef __FORK_BRAINDAMAGE
- /*
- * Set return values for child before vm_fork,
- * so they can be copied to child stack.
- * We return 0, rather than the traditional behaviour of modifying the
- * return value in the system call stub.
- * NOTE: the kernel stack may be at a different location in the child
- * process, and thus addresses of automatic variables (including retval)
- * may be invalid after vm_fork returns in the child process.
- */
- retval[0] = 0;
- retval[1] = 1;
- if (vm_fork(p1, p2, stack, stacksize))
- return (0);
-#else
/*
* Finish creating the child process. It will return through a
* different path later.
*/
uvm_fork(p1, p2, ((flags & FORK_SHAREVM) ? TRUE : FALSE), stack,
stacksize);
-#endif
+
vm = p2->p_vmspace;
if (flags & FORK_FORK) {
diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h
index 2446d545a9a..c9b45b665f4 100644
--- a/sys/vm/vm_extern.h
+++ b/sys/vm/vm_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_extern.h,v 1.21 2001/06/27 07:10:27 art Exp $ */
+/* $OpenBSD: vm_extern.h,v 1.22 2001/06/27 07:14:22 art Exp $ */
/* $NetBSD: vm_extern.h,v 1.20 1996/04/23 12:25:23 christos Exp $ */
/*-
@@ -66,11 +66,7 @@ void thread_sleep_msg __P((void *, simple_lock_t,
void vmapbuf __P((struct buf *, vsize_t));
void vunmapbuf __P((struct buf *, vsize_t));
void pagemove __P((caddr_t, caddr_t, size_t));
-#ifdef __FORK_BRAINDAMAGE
-int cpu_fork __P((struct proc *, struct proc *, void *, size_t));
-#else
void cpu_fork __P((struct proc *, struct proc *, void *, size_t));
-#endif
#ifndef cpu_swapin
void cpu_swapin __P((struct proc *));
#endif