Improve PID file removing errors logging

This commit is contained in:
Hennadii Stepanov 2019-02-02 00:33:33 +02:00
parent 5e0c0fd62f
commit 745a2ace18
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -262,9 +262,11 @@ void Shutdown(InitInterfaces& interfaces)
#ifndef WIN32
try {
fs::remove(GetPidFile());
if (!fs::remove(GetPidFile())) {
LogPrintf("%s: Unable to remove PID file: File does not exist\n", __func__);
}
} catch (const fs::filesystem_error& e) {
LogPrintf("%s: Unable to remove pidfile: %s\n", __func__, e.what());
LogPrintf("%s: Unable to remove PID file: %s\n", __func__, e.what());
}
#endif
interfaces.chain_clients.clear();