Skip to content

Commit

Permalink
optmize: adjust run parameters and fix error (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayantxie authored Nov 14, 2024
1 parent 9a29d3a commit 8811091
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,19 @@ function kill_pid_listening_on_port() {

for p in $pids; do
echo "Sending termination signal to $p..."
kill -s SIGTERM $p # 发送 SIGTERM 信号给程序
kill -s SIGTERM $p # Send SIGTERM signal to the processes
done

# 给程序一定时间处理信号后再强制终止
# Give the processes a certain amount of time to
# handle the signal before forcibly terminating them.
sleep 2

# Ignore errors because the processes may not exist.
set +e
for p in $pids; do
echo killing $p...
kill $p
done
sleep 1
set -e
}

0 comments on commit 8811091

Please sign in to comment.