diff options
Diffstat (limited to 'configd/src')
-rw-r--r-- | configd/src/apps/sentinel/service.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/configd/src/apps/sentinel/service.cpp b/configd/src/apps/sentinel/service.cpp index 9652db71a32..5153a98d1ff 100644 --- a/configd/src/apps/sentinel/service.cpp +++ b/configd/src/apps/sentinel/service.cpp @@ -15,18 +15,13 @@ LOG_SETUP(".service", "$Id$"); extern sig_atomic_t stop; -namespace config { -namespace sentinel { +namespace config::sentinel { namespace { -std::string getTempDir() { - const char * configuredTmp = getenv("TMPDIR"); - if (configuredTmp) { - return configuredTmp; - } +std::string getVespaTempDir() { std::string tmp = getenv("ROOT"); - tmp += "/tmp"; + tmp += "var/db/vespa/tmp"; return tmp; } @@ -114,7 +109,7 @@ Service::terminate(bool catchable) setState(KILLING); char pstackCmd[256]; LOG(info, "%s:%d failed to stop. Will dump the stack", name().c_str(), _pid); - snprintf(pstackCmd, sizeof(pstackCmd), "pstack %d > %s/%s.pstack.%d", _pid, getTempDir().c_str(), name().c_str(), _pid); + snprintf(pstackCmd, sizeof(pstackCmd), "pstack %d > %s/%s.pstack.%d", _pid, getVespaTempDir().c_str(), name().c_str(), _pid); int pstackRet = system(pstackCmd); if (pstackRet != 0) { LOG(warning, "'%s' failed with return value %d", pstackCmd, pstackRet); @@ -447,6 +442,5 @@ Service::stateName(ServiceState state) const return "--BAD--"; } +} -} // end namespace sentinel -} // end namespace config |