aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-03-20 18:06:08 +0100
committerEelco Dolstra <edolstra@gmail.com>2023-03-20 18:06:08 +0100
commit515662ad703cbd7c34df0020947392d233ac82eb (patch)
tree192036dcb6eec7a1989e2f140b74da3982dfc37d /src/libutil
parent16db8dc96f64a0facbb620907e571f2dfc8e802e (diff)
Cleanup
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/util.cc6
-rw-r--r--src/libutil/util.hh2
2 files changed, 2 insertions, 6 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index a703c5650..843a10eab 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1968,7 +1968,7 @@ std::string showBytes(uint64_t bytes)
// FIXME: move to libstore/build
-void commonChildInit(int stderrFd)
+void commonChildInit()
{
logger = makeSimpleLogger();
@@ -1982,10 +1982,6 @@ void commonChildInit(int stderrFd)
if (setsid() == -1)
throw SysError("creating a new session");
- /* Dup the write side of the logger pipe into stderr. */
- if (stderrFd != -1 && dup2(stderrFd, STDERR_FILENO) == -1)
- throw SysError("cannot pipe standard error into log file");
-
/* Dup stderr to stdout. */
if (dup2(STDERR_FILENO, STDOUT_FILENO) == -1)
throw SysError("cannot dup stderr into stdout");
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 52ca36fd1..a8e6f9fbb 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -704,7 +704,7 @@ typedef std::function<bool(const Path & path)> PathFilter;
extern PathFilter defaultPathFilter;
/* Common initialisation performed in child processes. */
-void commonChildInit(int stderrFd);
+void commonChildInit();
/* Create a Unix domain socket. */
AutoCloseFD createUnixDomainSocket();