net_server: handle EINTR on select()
Change-Id: I90af101cef72b33ecb6decec911d03f592c1ec7c Reviewed-on: https://review.haiku-os.org/c/haiku/+/3729 Reviewed-by: waddlesplash <[email protected]> Reviewed-by: Axel Dörfler <[email protected]>
This commit is contained in:
@@ -484,6 +484,8 @@ Services::_Listener()
|
|||||||
fLock.Unlock();
|
fLock.Unlock();
|
||||||
|
|
||||||
if (select(fMaxSocket, &set, NULL, NULL, NULL) < 0) {
|
if (select(fMaxSocket, &set, NULL, NULL, NULL) < 0) {
|
||||||
|
if (errno == EINTR)
|
||||||
|
continue;
|
||||||
// sleep a bit before trying again
|
// sleep a bit before trying again
|
||||||
snooze(1000000LL);
|
snooze(1000000LL);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user