From 8a8e8e8b45ada1cab64eb3abb45b1bc3efd0bc2a Mon Sep 17 00:00:00 2001 From: Dongyang Li Date: Mon, 1 Aug 2022 14:18:10 +0800 Subject: [PATCH] [fix](stop-script) use kill -9 to stop fe as usual (#11387) --- bin/stop_fe.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/stop_fe.sh b/bin/stop_fe.sh index 4b35e6edc7..0e6a96d37e 100755 --- a/bin/stop_fe.sh +++ b/bin/stop_fe.sh @@ -31,6 +31,11 @@ export PID_DIR=$( pwd ) +signum=9 +if [ "x"$1 = "x--grace" ]; then + signum=15 +fi + while read line; do envline=$(echo $line | sed 's/[[:blank:]]*=[[:blank:]]*/=/g' | sed 's/^[[:blank:]]*//g' | egrep "^[[:upper:]]([[:upper:]]|_|[[:digit:]])*=") envline=$(eval "echo $envline") @@ -64,9 +69,9 @@ if [ -f $pidfile ]; then fi # kill pid process and check it - if kill $pid >/dev/null 2>&1; then + if kill -${signum} $pid >/dev/null 2>&1; then while true; do - if kill -0 $pid >/dev/null; then + if kill -0 $pid >/dev/null 2>&1; then echo "waiting fe to stop, pid: $pid" sleep 2 else