Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't check /proc/pid/exe in --shutdown SERVER-5358

It didn't mix well with updates. When the mongod binary is updated the
exe link gets " (deleted)" added to the path.
  • Loading branch information...
commit 264b914c4b19e3e6e094d49761e85e9555b49957 1 parent 1911459
Mathias Stearn RedBeard0531 authored andy10gen committed
Showing with 0 additions and 16 deletions.
  1. +0 −16 db/db.cpp
16 db/db.cpp
View
@@ -989,22 +989,6 @@ int main(int argc, char* argv[]) {
procPath = (str::stream() << "/proc/" << pid);
if (!boost::filesystem::exists(procPath))
failed = true;
-
- string exePath = procPath + "/exe";
- if (boost::filesystem::exists(exePath)){
- char buf[256];
- int ret = readlink(exePath.c_str(), buf, sizeof(buf)-1);
- buf[ret] = '\0'; // readlink doesn't terminate string
- if (ret == -1) {
- int e = errno;
- cerr << "Error resolving " << exePath << ": " << errnoWithDescription(e);
- failed = true;
- }
- else if (!endsWith(buf, "mongod")){
- cerr << "Process " << pid << " is running " << buf << " not mongod" << endl;
- ::exit(-1);
- }
- }
}
catch (const std::exception& e){
cerr << "Error reading pid from lock file [" << name << "]: " << e.what() << endl;
Please sign in to comment.
Something went wrong with that request. Please try again.