From 788dac7f5b9987680f8b68d19323a0ae46da12af Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 7 Mar 2008 22:33:48 +0000 Subject: [PATCH] made the pid file reading smarter. removed the nasty killalls since they are no longer necessary git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1264 9efc2488-bf62-4759-914b-345cdb29e865 --- bin/osrf_ctl.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/osrf_ctl.sh b/bin/osrf_ctl.sh index c96f5b8..4793c95 100755 --- a/bin/osrf_ctl.sh +++ b/bin/osrf_ctl.sh @@ -115,11 +115,10 @@ function do_action { return 0; fi; - pid=$(cat $pidfile); - echo "Stopping $item : $pid"; - kill -s INT $pid 2> /dev/null; - sleep 1; - kill -9 $pid 2> /dev/null; + while read pid; do + echo "Stopping process $pid..." + kill -s INT $pid + done < $pidfile; rm -f $pidfile; fi; @@ -176,7 +175,6 @@ function start_c { function stop_c { do_action "stop" $PID_OSRF_C "OpenSRF C"; - killall -9 opensrf-c # hack for now to force kill all C services sleep 1; return 0; } -- 2.43.2