forked from lix-project/lix
Don't leak a file descriptor in commonChildInit()
This commit is contained in:
parent
1d487dc6a6
commit
7b22bec252
|
@ -367,6 +367,7 @@ void commonChildInit(Pipe & logPipe)
|
||||||
throw SysError(format("cannot open `%1%'") % pathNullDevice);
|
throw SysError(format("cannot open `%1%'") % pathNullDevice);
|
||||||
if (dup2(fdDevNull, STDIN_FILENO) == -1)
|
if (dup2(fdDevNull, STDIN_FILENO) == -1)
|
||||||
throw SysError("cannot dup null device into stdin");
|
throw SysError("cannot dup null device into stdin");
|
||||||
|
close(fdDevNull);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue