Skip to content

Commit e2c851c

Browse files
committed
Update metaServer.sh
如果pid的值是空字符串,表示进程还没起来,这时候应该返回1.
1 parent 415e112 commit e2c851c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

metamorphosis-server-wrapper/bin/metaServer.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ fi
3636
function running(){
3737
if [ -f "$PID_FILE" ]; then
3838
pid=$(cat "$PID_FILE")
39+
if [ -z "$pid" ]; then
40+
return 1;
3941
process=`ps aux | grep " $pid " | grep -v grep`;
4042
if [ -z "$process" ]; then
4143
return 1;
@@ -250,4 +252,4 @@ case $command in
250252
help;
251253
exit 1;
252254
;;
253-
esac
255+
esac

0 commit comments

Comments
 (0)