Check for valid pid before kill in node stop script (#5126)
This commit is contained in:
parent
bf5bce50a4
commit
5825b967d2
|
@ -659,7 +659,9 @@ stopNode() {
|
|||
! tmux list-sessions || tmux kill-session
|
||||
for pid in solana/{net-stats,oom-monitor}.pid; do
|
||||
pgid=\$(ps opgid= \$(cat \$pid) | tr -d '[:space:]')
|
||||
sudo kill -- -\$pgid
|
||||
if [[ -n \$pgid ]]; then
|
||||
sudo kill -- -\$pgid
|
||||
fi
|
||||
done
|
||||
for pattern in node solana- remote-; do
|
||||
pkill -9 \$pattern
|
||||
|
|
Loading…
Reference in New Issue