mirror of
https://github.com/NixOS/nix
synced 2025-06-29 10:31:15 +02:00
Simplify commonChildInit()
This commit is contained in:
parent
a387f46967
commit
19326ac297
4 changed files with 5 additions and 5 deletions
|
@ -1968,7 +1968,7 @@ std::string showBytes(uint64_t bytes)
|
|||
|
||||
|
||||
// FIXME: move to libstore/build
|
||||
void commonChildInit(Pipe & logPipe)
|
||||
void commonChildInit(int stderrFd)
|
||||
{
|
||||
logger = makeSimpleLogger();
|
||||
|
||||
|
@ -1983,7 +1983,7 @@ void commonChildInit(Pipe & logPipe)
|
|||
throw SysError("creating a new session");
|
||||
|
||||
/* Dup the write side of the logger pipe into stderr. */
|
||||
if (dup2(logPipe.writeSide.get(), STDERR_FILENO) == -1)
|
||||
if (dup2(stderrFd, STDERR_FILENO) == -1)
|
||||
throw SysError("cannot pipe standard error into log file");
|
||||
|
||||
/* Dup stderr to stdout. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue