diff options
Diffstat (limited to 'src/mongo/db/mongod_main.cpp')
-rw-r--r-- | src/mongo/db/mongod_main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index 94aaa958448..b079161955a 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -936,9 +936,9 @@ Status shutdownProcessByDBPathPidFile(const std::string& dbpath) { std::cout << "Killing process with pid: " << pid << std::endl; int ret = kill(pid, SIGTERM); if (ret) { - int e = errno; + auto ec = lastSystemError(); return {ErrorCodes::OperationFailed, - str::stream() << "Failed to kill process: " << errnoWithDescription(e)}; + str::stream() << "Failed to kill process: " << errorMessage(ec)}; } // Wait for process to terminate. |