summaryrefslogtreecommitdiff
path: root/networking/ifupdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r--networking/ifupdown.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 1bab2c5cb..69c56e879 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -1041,12 +1041,10 @@ static int popen2(FILE **in, FILE **out, char *command, char *param)
1041 xpiped_pair(outfd); 1041 xpiped_pair(outfd);
1042 1042
1043 fflush_all(); 1043 fflush_all();
1044 pid = vfork(); 1044 pid = xvfork();
1045 1045
1046 switch (pid) { 1046 if (pid == 0) {
1047 case -1: /* failure */ 1047 /* Child */
1048 bb_perror_msg_and_die("vfork");
1049 case 0: /* child */
1050 /* NB: close _first_, then move fds! */ 1048 /* NB: close _first_, then move fds! */
1051 close(infd.wr); 1049 close(infd.wr);
1052 close(outfd.rd); 1050 close(outfd.rd);