about summary refs log tree commit diff
diff options
context:
space:
mode:
-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 6e4c6e4a96..b91e4867c5 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;