aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-03-19 16:24:17 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-03-19 16:24:17 +0000
commit0764a7f72d7e5490b85dd0816bef8e56f6216d92 (patch)
treeab0f68d3d7c5517c52cfb90e6012456d75485aad
parent7a60133c6c27d55a0bf87287eb3cf425ed483010 (diff)
downloadbusybox-w32-0764a7f72d7e5490b85dd0816bef8e56f6216d92.tar.gz
busybox-w32-0764a7f72d7e5490b85dd0816bef8e56f6216d92.tar.bz2
busybox-w32-0764a7f72d7e5490b85dd0816bef8e56f6216d92.zip
ifupdown: make it NOMMU-capable
-rw-r--r--networking/ifupdown.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 586c3db63..174681984 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -939,13 +939,13 @@ static int doit(char *str)
939 int status; 939 int status;
940 940
941 fflush(NULL); 941 fflush(NULL);
942 child = fork(); 942 child = vfork();
943 switch (child) { 943 switch (child) {
944 case -1: /* failure */ 944 case -1: /* failure */
945 return 0; 945 return 0;
946 case 0: /* child */ 946 case 0: /* child */
947 execle(DEFAULT_SHELL, DEFAULT_SHELL, "-c", str, NULL, my_environ); 947 execle(DEFAULT_SHELL, DEFAULT_SHELL, "-c", str, NULL, my_environ);
948 exit(127); 948 _exit(127);
949 } 949 }
950 safe_waitpid(child, &status, 0); 950 safe_waitpid(child, &status, 0);
951 if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { 951 if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
@@ -1008,11 +1008,11 @@ static int popen2(FILE **in, FILE **out, char *command, char *param)
1008 xpiped_pair(outfd); 1008 xpiped_pair(outfd);
1009 1009
1010 fflush(NULL); 1010 fflush(NULL);
1011 pid = fork(); 1011 pid = vfork();
1012 1012
1013 switch (pid) { 1013 switch (pid) {
1014 case -1: /* failure */ 1014 case -1: /* failure */
1015 bb_perror_msg_and_die("fork"); 1015 bb_perror_msg_and_die("vfork");
1016 case 0: /* child */ 1016 case 0: /* child */
1017 /* NB: close _first_, then move fds! */ 1017 /* NB: close _first_, then move fds! */
1018 close(infd.wr); 1018 close(infd.wr);