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>
This commit is contained in:
parent
df9e2c2a55
commit
70f4f052f1
1 changed files with 2 additions and 0 deletions
|
@ -532,6 +532,8 @@ retry_send:
|
||||||
FD_ZERO(&rfds);
|
FD_ZERO(&rfds);
|
||||||
FD_SET(ctrl->s, &rfds);
|
FD_SET(ctrl->s, &rfds);
|
||||||
res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv);
|
res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv);
|
||||||
|
if (res < 0 && errno == EINTR)
|
||||||
|
continue;
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return res;
|
return res;
|
||||||
if (FD_ISSET(ctrl->s, &rfds)) {
|
if (FD_ISSET(ctrl->s, &rfds)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue