diff --git a/src/libstore/build.cc b/src/libstore/build.cc index b33649e6b..a1654917d 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -4154,9 +4154,9 @@ void Worker::waitForInput() assert(goal); set fds2(j->fds); + std::vector buffer(4096); for (auto & k : fds2) { if (FD_ISSET(k, &fds)) { - std::vector buffer(4096); ssize_t rd = read(k, buffer.data(), buffer.size()); if (rd == -1) { if (errno != EINTR)