From: Ben Greear <greearb@xxxxxxxxxxxxxxx> Daemonize disconnects stdin, so there is nothing to read and the eloop (often?) causes disconnect due to read of end-of-pipe from stdin. So, don't start edit mode in that case. Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx> --- wpa_supplicant/wpa_cli.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index 510f385..34812c1 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -4207,7 +4207,10 @@ static void try_connection(void *eloop_ctx, void *timeout_ctx) printf("Connection established.\n"); done: - start_edit(); + if (pid_file) /* daemonize mode, don't want edit-mode enabled since STDIN is not available */ + eloop_register_timeout(ping_interval, 0, wpa_cli_ping, NULL, NULL); + else + start_edit(); } -- 2.7.5 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap