summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Cottlehuber <dch@apache.org>2013-12-03 20:43:12 +0100
committerDave Cottlehuber <dch@apache.org>2013-12-03 20:43:12 +0100
commit818ef4f9a263a6d9b8555521478327bc69fc9e2e (patch)
tree1b134cc520d294dc5b38cac470c365a67f28cda2
parent862d8ae43ff1f44e910669031945b40c6073a01a (diff)
parentf75b8ab53a1868ad2c87a314059226efab018ded (diff)
downloadcouchdb-818ef4f9a263a6d9b8555521478327bc69fc9e2e.tar.gz
Merge branch '1795-fix-pidfile-race'
Patch via Dileep Bapat https://github.com/dileepbapat/couchdb/commit/f90476074504058c81a6e73814266a5a0724fc55.patch
-rw-r--r--bin/couchdb.tpl.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in
index 6ebacf458..538ebcbce 100644
--- a/bin/couchdb.tpl.in
+++ b/bin/couchdb.tpl.in
@@ -304,6 +304,10 @@ stop_couchdb () {
PID=`_get_pid`
STOP_TIMEOUT=60
if test -n "$PID"; then
+ if test "$1" = "false"; then
+ echo > $PID_FILE
+ fi
+
if kill -0 $PID 2> /dev/null; then
if kill -TERM $PID 2> /dev/null; then
count=0