Move all PID file stuff to init.cpp

It is only used from init.cpp.
Move-only refactoring.
This commit is contained in:
Hennadii Stepanov
2019-02-14 22:53:03 +02:00
parent 561e375c73
commit 3782075a5f
3 changed files with 24 additions and 26 deletions

View File

@@ -79,7 +79,6 @@
const int64_t nStartupTime = GetTime();
const char * const BITCOIN_CONF_FILENAME = "bitcoin.conf";
const char * const BITCOIN_PID_FILENAME = "bitcoind.pid";
ArgsManager gArgs;
@@ -958,13 +957,6 @@ std::string ArgsManager::GetChainName() const
return CBaseChainParams::MAIN;
}
#ifndef WIN32
fs::path GetPidFile()
{
return AbsPathForConfigVal(fs::path(gArgs.GetArg("-pid", BITCOIN_PID_FILENAME)));
}
#endif
bool RenameOver(fs::path src, fs::path dest)
{
#ifdef WIN32