diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 4c464d17c..5bdd49bac 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -367,6 +367,7 @@ void commonChildInit(Pipe & logPipe) throw SysError(format("cannot open `%1%'") % pathNullDevice); if (dup2(fdDevNull, STDIN_FILENO) == -1) throw SysError("cannot dup null device into stdin"); + close(fdDevNull); }