From 572beeed1ffda4ef041355ed058686433fe1878e Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Fri, 9 Oct 2020 21:03:27 +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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index 506fcd3..a7c482d 100644 --- a/run.sh +++ b/run.sh @@ -3,8 +3,12 @@ function run(){ nohup yarn start & - wait - pid=`findPortPid $webPort` + pid=-1 + while(( pid==-1 )) + do + sleep 1s + pid=`findPortPid $webPort` + done echo "pid is $pid" touch $pid.log && chmod +x $pid.log }