summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2000-01-24 20:44:14 +0000
committermickey <mickey@openbsd.org>2000-01-24 20:44:14 +0000
commitea86de25f5b0fe34444270a7f855c9bb5bc29e91 (patch)
tree26d1a336b59d2fe10fa4ca8e588ef3d78d6ffedf
parentreturn values are in ret* regs (diff)
downloadwireguard-openbsd-ea86de25f5b0fe34444270a7f855c9bb5bc29e91.tar.xz
wireguard-openbsd-ea86de25f5b0fe34444270a7f855c9bb5bc29e91.zip
setup fork() child return values
-rw-r--r--sys/arch/hppa/hppa/vm_machdep.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c
index 9bc12da289c..10ec2bd3abb 100644
--- a/sys/arch/hppa/hppa/vm_machdep.c
+++ b/sys/arch/hppa/hppa/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.14 2000/01/17 20:18:16 mickey Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.15 2000/01/24 20:44:14 mickey Exp $ */
/*
* Copyright (c) 1999-2000 Michael Shalayeff
@@ -232,6 +232,13 @@ cpu_fork(p1, p2, stack, stacksize)
#endif
/*
+ * Set up return value registers as libc:fork() expects
+ */
+ tf->tf_ret0 = p1->p_pid;
+ tf->tf_ret1 = 1; /* ischild */
+ tf->tf_t1 = 0; /* errno */
+
+ /*
* If specified, give the child a different stack.
*/
if (stack != NULL)