Retry select() if it was interrupted by a signal. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> --- src/common/wpa_ctrl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/wpa_ctrl.c b/src/common/wpa_ctrl.c index 5733aa6..783e6b0 100644 --- a/src/common/wpa_ctrl.c +++ b/src/common/wpa_ctrl.c @@ -532,8 +532,12 @@ retry_send: FD_ZERO(&rfds); FD_SET(ctrl->s, &rfds); res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv); - if (res < 0) - return res; + if (res < 0) { + if (errno == EINTR) + continue; + else + return res; + } if (FD_ISSET(ctrl->s, &rfds)) { res = recv(ctrl->s, reply, *reply_len, 0); if (res < 0) -- 2.7.0 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap