summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathew Robinson <chasinglogic@gmail.com>2019-06-06 21:25:09 +0000
committerMathew Robinson <chasinglogic@gmail.com>2019-06-07 13:58:40 -0400
commitdc56a0451ff60b3ff0a7ad7954b1bbb16ccbb980 (patch)
tree9cb8eebba9e9d08473eac9f372f2d3fb586d2112
parent1a980b72456f76e92ea01282dd0f8bcec44df362 (diff)
downloadmongo-dc56a0451ff60b3ff0a7ad7954b1bbb16ccbb980.tar.gz
SERVER-41546 mongo_killproc should not call exit
(cherry picked from commit 8b2879c30bcb8d8f5163ecf3050d8bdc421786c7)
-rwxr-xr-xrpm/init.d-mongod4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpm/init.d-mongod b/rpm/init.d-mongod
index 9b228203163..7f9f703abe0 100755
--- a/rpm/init.d-mongod
+++ b/rpm/init.d-mongod
@@ -102,7 +102,7 @@ mongo_killproc()
if [ ! -f "${pid_file}" ]; then
echo "No PID file detected, nothing to stop"
- exit 0
+ return 0
fi
# Per the man page the process name should always be the second
@@ -115,7 +115,7 @@ mongo_killproc()
if [ "($binary_name)" != "$stat_procname" ]; then
echo "PID file may have been tampered with, refusing to kill process"
echo "Expected (${binary_name}) but found ${stat_procname}"
- exit 1
+ return 1
fi
# This doesn't actually "daemonize" this process. All this function