summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-03-05 10:30:30 +0000
committerEric Andersen <andersen@codepoet.org>2003-03-05 10:30:30 +0000
commitf538b76f6f6c58f7783f3344244b6ae8ade68d46 (patch)
tree37be348a262cded8d55ed7003dfc1f19cdecf2e2 /libc/sysdeps
parenta0e60c6d2e0839e3f87b1e0ac3af4be838b7c9ab (diff)
The vfork system call on powerpc seems to be completely
broken. Use fork instead, per glibc behavior.
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/powerpc/vfork.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/powerpc/vfork.c b/libc/sysdeps/linux/powerpc/vfork.c
index 750255be9..6623d8dde 100644
--- a/libc/sysdeps/linux/powerpc/vfork.c
+++ b/libc/sysdeps/linux/powerpc/vfork.c
@@ -1,4 +1,3 @@
-
#include <unistd.h>
#include <sys/types.h>
#include <errno.h>
@@ -10,12 +9,17 @@
return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0), \
(type) __sc_ret
-int vfork(void)
+pid_t vfork(void)
{
unsigned long __sc_ret, __sc_err;
register unsigned long __sc_0 __asm__ ("r0");
register unsigned long __sc_3 __asm__ ("r3");
+#if 0
+ /* Sigh. The vfork system call on powerpc
+ * seems to be completely broken. So just
+ * use fork instead */
+
__sc_0 = __NR_vfork;
__asm__ __volatile__
("sc \n\t"
@@ -26,7 +30,9 @@ int vfork(void)
__sc_ret = __sc_3;
__sc_err = __sc_0;
- if((__sc_err & 0x10000000) && (__sc_ret == ENOSYS)){
+ if((__sc_err & 0x10000000) && (__sc_ret == ENOSYS))
+#endif
+ {
__sc_0 = __NR_fork;
__asm__ __volatile__
("sc \n\t"