[DRE-commits] [ruby-remcached] 03/11: debian/start_memcached_and_run.sh: change the way that the process is killed

Lucas Kanashiro kanashiro.duarte at gmail.com
Wed Mar 2 17:05:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

kanashiro-guest pushed a commit to branch master
in repository ruby-remcached.

commit dd1d2705fbf52e2a9342bd92532f929b2170fc58
Author: Lucas Kanashiro <kanashiro.duarte at gmail.com>
Date:   Wed Mar 2 12:02:01 2016 -0300

    debian/start_memcached_and_run.sh: change the way that the process is killed
---
 debian/changelog                  |  1 +
 debian/start_memcached_and_run.sh | 11 +++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index cecf687..8ece00d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ ruby-remcached (0.4.1-2.1) UNRELEASED; urgency=medium
     debian/rules accordingly.
   * Move logic for calling debian/start_memcached_and_run.sh for running the
     tests inside debian/ruby-tests.rake
+  * debian/start_memcached_and_run.sh: change the way that the process is killed
 
  -- Lucas Kanashiro <kanashiro.duarte at gmail.com>  Wed, 02 Mar 2016 10:02:57 -0300
 
diff --git a/debian/start_memcached_and_run.sh b/debian/start_memcached_and_run.sh
index 2b341ed..953852c 100755
--- a/debian/start_memcached_and_run.sh
+++ b/debian/start_memcached_and_run.sh
@@ -6,12 +6,15 @@
 set -e
 
 MEMCACHED_USER=nobody
-PIDFILE=/tmp/memcached.pid
 
 # Start memcached
-/usr/bin/memcached -d -u ${MEMCACHED_USER} -P ${PIDFILE}
+/usr/bin/memcached -u ${MEMCACHED_USER} &
+PID=$!
 
 "$@"
 
-# Stop memcached and cleanup pid file
-pkill memcached
+cleanup() {
+	# Stop memcached
+	kill -9 $PID
+}
+trap cleanup EXIT INT TERM ALRM

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-remcached.git



More information about the Pkg-ruby-extras-commits mailing list