From: Jörg Krause Date: Tue, 26 Jan 2016 15:28:53 +0000 (+0100) Subject: wpa_ctrl: Retry select() on EINTR X-Git-Tag: hostap_2_6~932 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70f4f052f1b183cff150cc8ed2299e52921f6a36;p=thirdparty%2Fhostap.git wpa_ctrl: Retry select() on EINTR Retry select() if it was interrupted by a signal. Signed-off-by: Jörg Krause --- diff --git a/src/common/wpa_ctrl.c b/src/common/wpa_ctrl.c index 5733aa605..623c2a768 100644 --- a/src/common/wpa_ctrl.c +++ b/src/common/wpa_ctrl.c @@ -532,6 +532,8 @@ retry_send: FD_ZERO(&rfds); FD_SET(ctrl->s, &rfds); res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv); + if (res < 0 && errno == EINTR) + continue; if (res < 0) return res; if (FD_ISSET(ctrl->s, &rfds)) {