aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/wpa_ctrl.c
diff options
context:
space:
mode:
authorJörg Krause <joerg.krause@embedded.rocks>2016-01-26 15:28:53 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-07 10:20:38 (GMT)
commit70f4f052f1b183cff150cc8ed2299e52921f6a36 (patch)
tree30d996e5ad0be71214ae9a58c9bae500e42c801e /src/common/wpa_ctrl.c
parentdf9e2c2a55eec199ba2c624897df22bfa48fa318 (diff)
downloadhostap-70f4f052f1b183cff150cc8ed2299e52921f6a36.zip
hostap-70f4f052f1b183cff150cc8ed2299e52921f6a36.tar.gz
hostap-70f4f052f1b183cff150cc8ed2299e52921f6a36.tar.bz2
wpa_ctrl: Retry select() on EINTR
Retry select() if it was interrupted by a signal. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Diffstat (limited to 'src/common/wpa_ctrl.c')
-rw-r--r--src/common/wpa_ctrl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/wpa_ctrl.c b/src/common/wpa_ctrl.c
index 5733aa6..623c2a7 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)) {