[uClibc-cvs] uClibc/libc/sysdeps/linux/powerpc vfork.c,1.2,1.3

Erik Andersen andersen at codepoet.org
Wed Mar 5 10:30:33 UTC 2003


Update of /var/cvs/uClibc/libc/sysdeps/linux/powerpc
In directory winder:/tmp/cvs-serv6178/libc/sysdeps/linux/powerpc

Modified Files:
	vfork.c 
Log Message:
The vfork system call on powerpc seems to be completely 
broken.  Use fork instead, per glibc behavior.


Index: vfork.c
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/powerpc/vfork.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- vfork.c	15 Nov 2002 14:12:11 -0000	1.2
+++ vfork.c	5 Mar 2003 10:30:30 -0000	1.3
@@ -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 @@
 	__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"




More information about the uClibc-cvs mailing list