aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/daemonizer/CMakeLists.txt4
-rw-r--r--src/daemonizer/posix_fork.cpp2
2 files changed, 6 insertions, 0 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