linux下tomcat的shutdown命令殺不死進程
Shell代碼
==============================bin/shutdown.sh
exec "$PRGDIR"/"$EXECUTABLE" stop -force "$@" #加上 -force
==============================bin/catalina.sh
在PRGDIR=`dirname "$PRG"`後面加上
#add by gaoyang
if [ -z "$CATALINA_PID" ]; then
CATALINA_PID=$PRGDIR/CATALINA_PID
cat $CATALINA_PID
fi
#end
在 if [ -f "$CATALINA_PID" ]; then
PID=`cat "$CATALINA_PID"`
echo "Killing Tomcat with the PID: $PID"
kill -9 $PID
後面加上
#add by gaoyang
PID1=`expr $PID - 1 `
echo "Killing Tomcat with thie PID: $PID1"
kill -9 $PID1
#end