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)
1271 client_data.sockfd = -1; 1271 client_data.sockfd = -1;
1272 str_V = "udhcp "BB_VER; 1272 str_V = "udhcp "BB_VER;
1273 1273
1274 /* Make sure fd 0,1,2 are open */
1275 /* Set up the signal pipe on fds 3,4 - must be before openlog() */
1276 udhcp_sp_setup();
1277
1274 /* Parse command line */ 1278 /* Parse command line */
1275 opt = getopt32long(argv, "^" 1279 opt = getopt32long(argv, "^"
1276 /* O,x: list; -T,-t,-A take numeric param */ 1280 /* O,x: list; -T,-t,-A take numeric param */
@@ -1385,14 +1389,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1385 logmode |= LOGMODE_SYSLOG; 1389 logmode |= LOGMODE_SYSLOG;
1386 } 1390 }
1387 1391
1388 /* Make sure fd 0,1,2 are open */
1389 bb_sanitize_stdio();
1390 /* Create pidfile */ 1392 /* Create pidfile */
1391 write_pidfile(client_data.pidfile); 1393 write_pidfile(client_data.pidfile);
1392 /* Goes to stdout (unless NOMMU) and possibly syslog */ 1394 /* Goes to stdout (unless NOMMU) and possibly syslog */
1393 bb_info_msg("started, v"BB_VER); 1395 bb_info_msg("started, v"BB_VER);
1394 /* Set up the signal pipe */
1395 udhcp_sp_setup();
1396 /* We want random_xid to be random... */ 1396 /* We want random_xid to be random... */
1397 srand(monotonic_us()); 1397 srand(monotonic_us());
1398 1398