aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index cb85fa9e3..f040e93f7 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1271,6 +1271,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
client_data.sockfd = -1;
str_V = "udhcp "BB_VER;
+ /* Make sure fd 0,1,2 are open */
+ /* Set up the signal pipe on fds 3,4 - must be before openlog() */
+ udhcp_sp_setup();
+
/* Parse command line */
opt = getopt32long(argv, "^"
/* O,x: list; -T,-t,-A take numeric param */
@@ -1385,14 +1389,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
logmode |= LOGMODE_SYSLOG;
}
- /* Make sure fd 0,1,2 are open */
- bb_sanitize_stdio();
/* Create pidfile */
write_pidfile(client_data.pidfile);
/* Goes to stdout (unless NOMMU) and possibly syslog */
bb_info_msg("started, v"BB_VER);
- /* Set up the signal pipe */
- udhcp_sp_setup();
/* We want random_xid to be random... */
srand(monotonic_us());