mirror of
https://github.com/NixOS/nix
synced 2025-06-29 06:21:14 +02:00
Fix max fd calc and add test
This commit is contained in:
parent
a83694c7a1
commit
3df78858f2
3 changed files with 18 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue