Remove some redundant close() calls

They are unnecessary because we set the close-on-exec flag.
This commit is contained in:
Eelco Dolstra 2012-11-09 16:58:51 +01:00
parent 10dcee99ed
commit 198dbe7fa1
3 changed files with 8 additions and 18 deletions

View file

@ -968,8 +968,6 @@ void LocalStore::startSubstituter(const Path & substituter, RunningSubstituter &
with --option) to the substituter. */
setenv("_NIX_OPTIONS", settings.pack().c_str(), 1);
fromPipe.readSide.close();
toPipe.writeSide.close();
if (dup2(toPipe.readSide, STDIN_FILENO) == -1)
throw SysError("dupping stdin");
if (dup2(fromPipe.writeSide, STDOUT_FILENO) == -1)