diff options
author | root <root@rshg054.dnsready.net> | 2012-07-12 00:04:35 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-07-12 00:04:35 +0000 |
commit | 00d32b0938eebfa45f0543cae655abf5233eb99c (patch) | |
tree | 7528e734c1f6f955da0baca5909906e797562c09 /community-staging/mongodb/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch | |
parent | b44e3e7f16abe5e4cb428571db65d300b7cc44be (diff) |
Thu Jul 12 00:04:34 UTC 2012
Diffstat (limited to 'community-staging/mongodb/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch')
-rw-r--r-- | community-staging/mongodb/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/community-staging/mongodb/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch b/community-staging/mongodb/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch new file mode 100644 index 000000000..aff066450 --- /dev/null +++ b/community-staging/mongodb/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch @@ -0,0 +1,43 @@ +From 77f78f64c192572e6eb956b0fe28ecd975ff6461 Mon Sep 17 00:00:00 2001 +From: Thomas Dziedzic <gostrc@gmail.com> +Date: Tue, 10 Apr 2012 19:38:58 -0500 +Subject: [PATCH 2/2] Backport for mongodb 2.0.4 "Don't check /proc/pid/exe in + --shutdown SERVER-5358" + +Backported to fix https://jira.mongodb.org/browse/SERVER-5358 + +https://github.com/mongodb/mongo/commit/c28d97d1a14a36ffc056bfd9ba7262b0a1509b5b +--- + db/db.cpp | 16 ---------------- + 1 file changed, 16 deletions(-) + +diff --git a/db/db.cpp b/db/db.cpp +index b1d1db8..0a21f4d 100644 +--- a/db/db.cpp ++++ b/db/db.cpp +@@ -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; +-- +1.7.10 + |