You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
riskshell/shell/savePid

19 lines
328 B

#!/bin/sh
#保存应用进程pid
echo "findPort $1"
#重试时间
second=5s
while true
do
pid=`findPortPid $1`
if [ `$pid|wc -l` -eq 0 ]
then
echo "没有找到端口:$1的pid,$second后重试"
sleep $second
else
echo "端口:$1的pid:$pid"
echo $pid>pid
break
fi
done