summaryrefslogtreecommitdiff
path: root/src/mongo/db/mongod_main.cpp
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2022-04-28 07:39:29 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-28 08:28:54 +0000
commit5b17ba836945f2b7cbcc77a643311f41fe7b7b6e (patch)
tree11aa849763d123d755eb0d9c30215904acdef4c2 /src/mongo/db/mongod_main.cpp
parent30260c79d9e09dee6c68637f87db6c4bdf16cbfe (diff)
downloadmongo-5b17ba836945f2b7cbcc77a643311f41fe7b7b6e.tar.gz
SERVER-41353 replace errnoWithDescription with an API based on std::error_code
Diffstat (limited to 'src/mongo/db/mongod_main.cpp')
-rw-r--r--src/mongo/db/mongod_main.cpp4
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.