From 7c8bf0de32cb03eb12ba80f905536890c1712156 Mon Sep 17 00:00:00 2001 From: Mathew Robinson Date: Thu, 6 Jun 2019 21:25:09 +0000 Subject: SERVER-41546 mongo_killproc should not call exit (cherry picked from commit 8b2879c30bcb8d8f5163ecf3050d8bdc421786c7) --- rpm/init.d-mongod | 4 ++-- 1 file 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 -- cgit v1.2.1