diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_fork.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index a3b887a9ca9..becb63288a8 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.66 2004/05/24 02:51:22 deraadt Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.67 2004/06/05 22:38:40 tedu Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -371,8 +371,10 @@ fork1(struct proc *p1, int exitsig, int flags, void *stack, size_t stacksize, * Return child pid to parent process, * marking us as parent via retval[1]. */ - retval[0] = p2->p_pid; - retval[1] = 0; + if (retval != NULL) { + retval[0] = p2->p_pid; + retval[1] = 0; + } return (0); } |