aboutsummaryrefslogtreecommitdiff
path: root/src/daemonizer/posix_fork.cpp
diff options
context:
space:
mode:
authorston1th <ston1th@giftfish.de>2018-02-13 19:54:49 +0100
committerston1th <ston1th@giftfish.de>2018-02-23 21:27:14 +0100
commit496055d12871eca27b024fd2f746a8e5d07e5714 (patch)
treec8aee88e652efacb042da04d5cb19d145379915a /src/daemonizer/posix_fork.cpp
parentMerge pull request #3198 (diff)
downloadmonero-496055d12871eca27b024fd2f746a8e5d07e5714.tar.xz
monerod: do not log to tmpdir in daemon mode
The logging to /tmp/bitmonero.daemon.stdout.stderr caused segfaults if the /tmp mount was full (#2851). Now the daemon is only logging to /tmp/bitmonero.daemon.stdout.stderr in the debug builds.
Diffstat (limited to 'src/daemonizer/posix_fork.cpp')
-rw-r--r--src/daemonizer/posix_fork.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/daemonizer/posix_fork.cpp b/src/daemonizer/posix_fork.cpp
index 4dff04f3f..3cbee9c51 100644
--- a/src/daemonizer/posix_fork.cpp
+++ b/src/daemonizer/posix_fork.cpp
@@ -115,6 +115,7 @@ void fork(const std::string & pidfile)
quit("Unable to open /dev/null");
}
+#ifdef DEBUG_TMPDIR_LOG
// Send standard output to a log file.
const char *tmpdir = getenv("TMPDIR");
if (!tmpdir)
@@ -133,6 +134,7 @@ void fork(const std::string & pidfile)
{
quit("Unable to dup output descriptor");
}
+#endif
}
} // namespace posix