aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-09-29 02:26:30 +0000
committerBill Nottingham <notting@redhat.com>2004-09-29 02:26:30 +0000
commit642b69bd563d709a5a88cf123df64883b63e5d9c (patch)
treed733bf6e354fc3b2accfc5bd0cc0b2b15a6e9e79 /rc.d
parent056b0e4f0db94ee3e26af72de17d720bc3dd1dcc (diff)
downloadinitscripts-642b69bd563d709a5a88cf123df64883b63e5d9c.tar
initscripts-642b69bd563d709a5a88cf123df64883b63e5d9c.tar.gz
initscripts-642b69bd563d709a5a88cf123df64883b63e5d9c.tar.bz2
initscripts-642b69bd563d709a5a88cf123df64883b63e5d9c.tar.xz
initscripts-642b69bd563d709a5a88cf123df64883b63e5d9c.zip
backport checkpid changes (#134030)r7-31-18-EL
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/functions10
1 files changed, 5 insertions, 5 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 2293a20f..4b6ae7c5 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -72,9 +72,9 @@ checkpid() {
local i
for i in $* ; do
- [ -d "/proc/$i" ] || return 1
+ [ -d "/proc/$i" ] && return 0
done
- return 0
+ return 1
}
@@ -192,12 +192,12 @@ killproc() {
if [ "$notset" -eq "1" ] ; then
if checkpid $pid 2>&1; then
# TERM first, then KILL if not dead
- kill -TERM $pid
+ kill -TERM $pid >/dev/null 2>&1
usleep 100000
if checkpid $pid && sleep 1 &&
checkpid $pid && sleep 3 &&
checkpid $pid ; then
- kill -KILL $pid
+ kill -KILL $pid >/dev/null 2>&1
usleep 100000
fi
fi
@@ -208,7 +208,7 @@ killproc() {
# use specified level only
else
if checkpid $pid; then
- kill $killlevel $pid
+ kill $killlevel $pid >/dev/null 2>&1
RC=$?
[ "$RC" -eq 0 ] && success $"$base $killlevel" || failure $"$base $killlevel"
fi