aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-01-22 20:28:25 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-07 10:38:04 (GMT)
commit2e69bdd16ac1c4c6a974e588f41aa954f05f1487 (patch)
tree6bccbf561ceef9034bcd79a53c4fac052e44cb94 /wpa_supplicant
parent70f4f052f1b183cff150cc8ed2299e52921f6a36 (diff)
downloadhostap-2e69bdd16ac1c4c6a974e588f41aa954f05f1487.zip
hostap-2e69bdd16ac1c4c6a974e588f41aa954f05f1487.tar.gz
hostap-2e69bdd16ac1c4c6a974e588f41aa954f05f1487.tar.bz2
eloop: Add eloop_sock_requeue()
This function can be used to re-build eloop socket tables after forking for eloop implementations that need this. Signed-off-by: Roy Marples <roy@marples.name>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_cli.c2
-rw-r--r--wpa_supplicant/wpa_priv.c2
-rw-r--r--wpa_supplicant/wpa_supplicant.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 1aea0a6..265f72c 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -4441,7 +4441,7 @@ int main(int argc, char *argv[])
}
}
- if (daemonize && os_daemonize(pid_file))
+ if (daemonize && os_daemonize(pid_file) && eloop_sock_requeue())
return -1;
if (action_file)
diff --git a/wpa_supplicant/wpa_priv.c b/wpa_supplicant/wpa_priv.c
index fa5a6de..3f91cc1 100644
--- a/wpa_supplicant/wpa_priv.c
+++ b/wpa_supplicant/wpa_priv.c
@@ -1128,7 +1128,7 @@ int main(int argc, char *argv[])
interfaces = iface;
}
- if (daemonize && os_daemonize(pid_file))
+ if (daemonize && os_daemonize(pid_file) && eloop_sock_requeue())
goto out;
eloop_register_signal_terminate(wpa_priv_terminate, NULL);
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 03b1353..c3c1f14 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -5221,7 +5221,8 @@ int wpa_supplicant_run(struct wpa_global *global)
struct wpa_supplicant *wpa_s;
if (global->params.daemonize &&
- wpa_supplicant_daemon(global->params.pid_file))
+ (wpa_supplicant_daemon(global->params.pid_file) ||
+ eloop_sock_requeue()))
return -1;
if (global->params.wait_for_monitor) {