aboutsummaryrefslogtreecommitdiff
path: root/networking/ifupdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r--networking/ifupdown.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 8caff3f4d..c12391863 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -1008,9 +1008,12 @@ 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 = xvfork(); 1011 pid = vfork();
1012 1012
1013 if (pid == 0) { /* child */ 1013 switch (pid) {
1014 case -1: /* failure */
1015 bb_perror_msg_and_die("vfork");
1016 case 0: /* child */
1014 /* NB: close _first_, then move fds! */ 1017 /* NB: close _first_, then move fds! */
1015 close(infd.wr); 1018 close(infd.wr);
1016 close(outfd.rd); 1019 close(outfd.rd);