diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-02-22T18·15+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-02-22T18·15+0000 |
commit | ddde8e2f32b5c6785e9ac7c6ea6eb84813cca293 (patch) | |
tree | 036c64ef3fd27691fc817b1adaebff990e4d63b9 /src/nix-worker/nix-worker.cc | |
parent | 27bb0ac7d2571d32c28cd09bf23cf916905d2557 (diff) |
* Handle EINTR in select().
Diffstat (limited to '')
-rw-r--r-- | src/nix-worker/nix-worker.cc | 6 |
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; |