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-0764a7f72d7e5490b85dd0816bef8e56f6216d92.tar.gz
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)
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 @@ static int popen2(FILE **in, FILE **out, char *command, char *param)
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);