svn commit: trunk/busybox/networking

vda at busybox.net vda at busybox.net
Wed Mar 19 16:24:18 UTC 2008


Author: vda
Date: 2008-03-19 09:24:17 -0700 (Wed, 19 Mar 2008)
New Revision: 21402

Log:
ifupdown: make it NOMMU-capable



Modified:
   trunk/busybox/networking/ifupdown.c


Changeset:
Modified: trunk/busybox/networking/ifupdown.c
===================================================================
--- trunk/busybox/networking/ifupdown.c	2008-03-19 13:24:13 UTC (rev 21401)
+++ trunk/busybox/networking/ifupdown.c	2008-03-19 16:24:17 UTC (rev 21402)
@@ -939,13 +939,13 @@
 		int status;
 
 		fflush(NULL);
-		child = fork();
+		child = vfork();
 		switch (child) {
 		case -1: /* failure */
 			return 0;
 		case 0: /* child */
 			execle(DEFAULT_SHELL, DEFAULT_SHELL, "-c", str, NULL, my_environ);
-			exit(127);
+			_exit(127);
 		}
 		safe_waitpid(child, &status, 0);
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
@@ -1008,11 +1008,11 @@
 	xpiped_pair(outfd);
 
 	fflush(NULL);
-	pid = fork();
+	pid = vfork();
 
 	switch (pid) {
 	case -1:  /* failure */
-		bb_perror_msg_and_die("fork");
+		bb_perror_msg_and_die("vfork");
 	case 0:  /* child */
 		/* NB: close _first_, then move fds! */
 		close(infd.wr);




More information about the busybox-cvs mailing list