mirror of
https://github.com/NixOS/nix.git
synced 2024-12-02 03:32:27 +00:00
* Handle EINTR in select().
This commit is contained in:
parent
27bb0ac7d2
commit
ddde8e2f32
@ -70,8 +70,8 @@ static bool isFarSideClosed(int socket)
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(socket, &fds);
|
||||
|
||||
if (select(socket + 1, &fds, 0, 0, &timeout) == -1)
|
||||
throw SysError("select()");
|
||||
while (select(socket + 1, &fds, 0, 0, &timeout) == -1)
|
||||
if (errno != EINTR) throw SysError("select()");
|
||||
|
||||
if (!FD_ISSET(socket, &fds)) return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user