lockfile: only compute and log once
This commit is contained in:
parent
2c60e382f8
commit
310d28a4a1
@ -1398,7 +1398,8 @@ string RclConfig::getIdxStatusFile() const
|
||||
// Thanks to user Madhu for this fix.
|
||||
string RclConfig::getPidfile() const
|
||||
{
|
||||
string fn;
|
||||
static string fn;
|
||||
if (fn.empty()) {
|
||||
#ifndef _WIN32
|
||||
const char *p = getenv("XDG_RUNTIME_DIR");
|
||||
string rundir;
|
||||
@ -1428,6 +1429,7 @@ string RclConfig::getPidfile() const
|
||||
fn = path_cat(getCacheDir(), "index.pid");
|
||||
out:
|
||||
LOGINF("RclConfig: pid/lock file: " << fn << "\n");
|
||||
}
|
||||
return fn;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user