Make PID file creating errors fatal

This commit is contained in:
Hennadii Stepanov
2019-02-02 00:40:36 +02:00
parent 745a2ace18
commit 561e375c73
4 changed files with 21 additions and 13 deletions

View File

@@ -963,16 +963,6 @@ fs::path GetPidFile()
{
return AbsPathForConfigVal(fs::path(gArgs.GetArg("-pid", BITCOIN_PID_FILENAME)));
}
void CreatePidFile(const fs::path &path, pid_t pid)
{
FILE* file = fsbridge::fopen(path, "w");
if (file)
{
fprintf(file, "%d\n", pid);
fclose(file);
}
}
#endif
bool RenameOver(fs::path src, fs::path dest)