about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 60b0a531f4..d2a270259a 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -3835,6 +3835,9 @@ void Worker::waitForInput()
     int fdMax = 0;
     for (auto & i : children) {
         for (auto & j : i.fds) {
+            if (j >= FD_SETSIZE) {
+                throw BuildError("reached FD_SETSIZE limit");
+            }
             FD_SET(j, &fds);
             if (j >= fdMax) fdMax = j + 1;
         }