From 7b22bec252a155514d811a8e2acc21562ac02bd4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 5 Mar 2012 20:28:09 +0100 Subject: Don't leak a file descriptor in commonChildInit() --- src/libstore/build.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 4c464d17c1..5bdd49bac0 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); } -- cgit 1.4.1