diff options
| author | Hennadii Stepanov <[email protected]> | 2019-02-02 00:33:33 +0200 |
|---|---|---|
| committer | Hennadii Stepanov <[email protected]> | 2019-02-02 00:33:33 +0200 |
| commit | 745a2ace18ce857bc712d7e66c8bad7c082c07e2 (patch) | |
| tree | 60f26c9e402407f4139d1c7e97b1810c75672d2e /src/init.cpp | |
| parent | Merge #15254: Trivial: fixup a few doxygen comments (diff) | |
| download | discoin-745a2ace18ce857bc712d7e66c8bad7c082c07e2.tar.xz discoin-745a2ace18ce857bc712d7e66c8bad7c082c07e2.zip | |
Improve PID file removing errors logging
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 77d050561..a5cd4d3cd 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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(); |