about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nix-worker/nix-worker.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index 6e4c6e4a9698..b91e4867c581 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -69,9 +69,9 @@ static bool isFarSideClosed(int socket)
     fd_set fds;
     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;