about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/build.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 4c464d17c157..5bdd49bac067 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);
 }