diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-03-05 19:10:51 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-03-05 19:10:51 +0200 |
commit | b54587d7b39f57e81af2184db8c63b3549bea8e9 (patch) | |
tree | 3a7e6ea5299c48aadc43479e7b6ca2d2a349f07d | |
parent | Merge pull request #3156 (diff) | |
parent | removed systemd private tempdir (diff) | |
download | monero-b54587d7b39f57e81af2184db8c63b3549bea8e9.tar.xz |
Merge pull request #3259
6d900a40 removed systemd private tempdir (ston1th)
496055d1 monerod: do not log to tmpdir in daemon mode (ston1th)
-rw-r--r-- | src/daemonizer/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/daemonizer/posix_fork.cpp | 2 | ||||
-rw-r--r-- | utils/systemd/monerod.service | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/daemonizer/CMakeLists.txt b/src/daemonizer/CMakeLists.txt index 2c0583c49..2753d0003 100644 --- a/src/daemonizer/CMakeLists.txt +++ b/src/daemonizer/CMakeLists.txt @@ -54,6 +54,10 @@ else() ) endif() +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions(-DDEBUG_TMPDIR_LOG=1) +endif() + monero_private_headers(daemonizer ${daemonizer_private_headers}) monero_add_library(daemonizer 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 diff --git a/utils/systemd/monerod.service b/utils/systemd/monerod.service index b6b6b6ce6..696be4c33 100644 --- a/utils/systemd/monerod.service +++ b/utils/systemd/monerod.service @@ -15,7 +15,6 @@ ExecStart=/usr/bin/monerod --config-file /etc/monerod.conf \ --detach --pidfile /run/monero/monerod.pid Restart=always -PrivateTmp=true [Install] WantedBy=multi-user.target |