SVN: rc-scripts/trunk/rc.d/init.d/functions
glen
glen at pld-linux.org
Tue Dec 16 20:00:18 CET 2008
Author: glen
Date: Tue Dec 16 20:00:17 2008
New Revision: 10038
Modified:
rc-scripts/trunk/rc.d/init.d/functions
Log:
- add usage for killproc
- shift 2 is better than shift shift
Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions (original)
+++ rc-scripts/trunk/rc.d/init.d/functions Tue Dec 16 20:00:17 2008
@@ -636,26 +636,23 @@
typeset notset killlevel base pid pidfile result
# Test syntax.
if [ $# = 0 ]; then
- msg_usage " killproc {program} [signal]"
+ msg_usage " killproc <--pidfile PIDFILE> {program} [-SIGNAME]"
return 2
fi
while [ "$1" != "${1##-}" ]; do
case $1 in
--pidfile)
- shift
- pidfile="$1"
- shift
+ pidfile="$2"
+ shift 2
;;
--waitforname)
- shift
- waitname="$1"
- shift
+ waitname="$2"
+ shift 2
;;
--waitfortime)
- shift
- waittime="$1"
- shift
+ waittime="$2"
+ shift 2
;;
esac
done
@@ -706,6 +703,8 @@
if checkpid $pid && sleep 1 &&
checkpid $pid && sleep 3 &&
checkpid $pid; then
+ # XXX: SIGKILL is sent already on 4th second!
+ # HARMFUL for example to mysqld (which is already workarounded)
kill -KILL $pid
usleep 100000
fi
More information about the pld-cvs-commit
mailing list