aboutsummaryrefslogtreecommitdiff
path: root/src/nix-daemon/nix-daemon.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-20 05:08:50 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-20 05:08:50 +0000
commit3df78858f2ad91a80e30ba910119a0c16c05c66a (patch)
treee3956e944eaf4fe9617b60452452dc332eb2bf09 /src/nix-daemon/nix-daemon.cc
parenta83694c7a1212567ec2f032f84c0d72722bcf5ea (diff)
Fix max fd calc and add test
Diffstat (limited to 'src/nix-daemon/nix-daemon.cc')
-rw-r--r--src/nix-daemon/nix-daemon.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index bdf56d2e2..6e652ccbf 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -291,7 +291,7 @@ static int _main(int argc, char * * argv)
int from = conn->from.fd;
int to = conn->to.fd;
- auto nfds = std::max(from, to) + 1;
+ auto nfds = std::max(from, STDIN_FILENO) + 1;
while (true) {
fd_set fds;
FD_ZERO(&fds);