From 95c9cb8afd52bccbd87cec4d9dc422afc6093a87 Mon Sep 17 00:00:00 2001 From: chalsliu Date: Mon, 3 Dec 2018 14:32:41 +0800 Subject: [PATCH] Remove BE starting error message when the process in the pid file does not exist Redirect output message of `kill` to /dev/null. --- bin/start_be.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/start_be.sh b/bin/start_be.sh index 7136c884a44cc8..ae4f2355b7acf0 100755 --- a/bin/start_be.sh +++ b/bin/start_be.sh @@ -55,14 +55,14 @@ rm -f ${UDF_RUNTIME_DIR}/* pidfile=$PID_DIR/be.pid if [ -f $pidfile ]; then - if kill -0 $(cat $pidfile); then + if kill -0 $(cat $pidfile) > /dev/null 2>&1; then echo "Backend running as process `cat $pidfile`. Stop it first." exit 1 else rm $pidfile fi fi - + chmod 755 ${DORIS_HOME}/lib/palo_be echo "start time: "$(date) >> $LOG_DIR/be.out