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