From: Jouni Malinen Date: Wed, 22 Jul 2015 14:10:32 +0000 (+0300) Subject: wpa_cli: Skip action script execution when eloop termination is pending X-Git-Tag: hostap_2_5~325 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.git;a=commitdiff_plain;h=b525cbab861a8338e3feffbae8a79ed36129a621 wpa_cli: Skip action script execution when eloop termination is pending Try to exit more quickly by avoiding execution of the action script for any pending events if the process is requested to be killed. This may help in avoiding hitting the two second SIGALRM workaround in eloop in case some of the action scripts block for long period of time. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index c5d8333..2d1adc9 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -3585,6 +3585,9 @@ static void wpa_cli_action_process(const char *msg) const char *ifname = ctrl_ifname; char ifname_buf[100]; + if (eloop_terminated()) + return; + pos = msg; if (os_strncmp(pos, "IFNAME=", 7) == 0) { const char *end;