diff options
Diffstat (limited to 'hostapd/main.c')
-rw-r--r-- | hostapd/main.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/hostapd/main.c b/hostapd/main.c index 4913cbde..1b9002cf 100644 --- a/hostapd/main.c +++ b/hostapd/main.c @@ -408,9 +408,16 @@ static int hostapd_global_run(struct hapd_interfaces *ifaces, int daemonize, } #endif /* EAP_SERVER_TNC */ - if (daemonize && os_daemonize(pid_file)) { - wpa_printf(MSG_ERROR, "daemon: %s", strerror(errno)); - return -1; + if (daemonize) { + if (os_daemonize(pid_file)) { + wpa_printf(MSG_ERROR, "daemon: %s", strerror(errno)); + return -1; + } + if (eloop_sock_requeue()) { + wpa_printf(MSG_ERROR, "eloop_sock_requeue: %s", + strerror(errno)); + return -1; + } } eloop_run(); |