This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new bff561c0da [feature](script) add --grace option for stop_be.sh (#10626) bff561c0da is described below commit bff561c0da0cc94a8018f6822a41b16236e4ac42 Author: Lei Zhang <1091517...@qq.com> AuthorDate: Wed Jul 6 17:53:01 2022 +0800 [feature](script) add --grace option for stop_be.sh (#10626) be asan mem leak check needs exit app gracefully. --- bin/stop_be.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/stop_be.sh b/bin/stop_be.sh index 2ca1b47124..9d65d73307 100755 --- a/bin/stop_be.sh +++ b/bin/stop_be.sh @@ -22,6 +22,11 @@ curdir=`cd "$curdir"; pwd` export DORIS_HOME=`cd "$curdir/.."; pwd` export PID_DIR=`cd "$curdir"; pwd` +signum=9 +if [ $1 = "--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"` @@ -41,7 +46,7 @@ if [ -f $pidfile ]; then fi if kill -0 $pid; then - if kill -9 $pid > /dev/null 2>&1; then + if kill -${signum} $pid > /dev/null 2>&1; then echo "stop $pidcomm, and remove pid file. " rm $pidfile exit 0 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org