[BusyBox-cvs] busybox/shell hush.c,1.66,1.67 lash.c,1.159,1.160

Erik Andersen andersen at busybox.net
Mon Apr 12 17:59:27 UTC 2004


Update of /var/cvs/busybox/shell
In directory nail:/tmp/cvs-serv16540/shell

Modified Files:
	hush.c lash.c 
Log Message:
Jamie Guinan writes:

It looks like latest uClibc defines ARCH_HAS_MMU, but a few busybox files
test UCLIBC_HAS_MMU, resulting in vfork() getting called instead of
fork(), etc.

Patch below.   Only tested for lash.

Cheers,
-Jamie



Index: hush.c
===================================================================
RCS file: /var/cvs/busybox/shell/hush.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- a/hush.c	7 Apr 2004 09:34:26 -0000	1.66
+++ b/hush.c	12 Apr 2004 17:59:24 -0000	1.67
@@ -1439,7 +1439,7 @@
 		}
 
 		/* XXX test for failed fork()? */
-#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
+#if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__)
 		if (!(child->pid = fork()))
 #else
 		if (!(child->pid = vfork()))
@@ -2258,7 +2258,7 @@
 #if 1
 	int pid, channel[2];
 	if (pipe(channel)<0) bb_perror_msg_and_die("pipe");
-#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
+#if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__)
 	pid=fork();
 #else
 	pid=vfork();

Index: lash.c
===================================================================
RCS file: /var/cvs/busybox/shell/lash.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -d -r1.159 -r1.160
--- a/lash.c	7 Apr 2004 09:34:26 -0000	1.159
+++ b/lash.c	12 Apr 2004 17:59:24 -0000	1.160
@@ -1380,7 +1380,7 @@
 			}
 		}
 
-#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
+#if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__)
 		if (!(child->pid = fork()))
 #else
 		if (!(child->pid = vfork()))




More information about the busybox-cvs mailing list