From 8f773f28d7526c6dd7637f89245944656e5d5605 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Fri, 9 Oct 2020 20:57:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/run.sh b/run.sh index 1645d9e..b09dc9c 100644 --- a/run.sh +++ b/run.sh @@ -2,9 +2,13 @@ function run(){ nohup yarn start & - sleep 5s - pid=`findPortPid $webPort` - echo "pid is $pid" + + pid=-1 + while(( pid==-1 )) + do + pid=`findPortPid $webPort` + echo "pid is $pid" + done touch $pid.log && chmod +x $pid.log }