Skip to content

Commit d8098d2

Browse files
authored
Fix order of 'kill' arguments in killport function. (#577)
1 parent 5adf782 commit d8098d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.evergreen/process-utils.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ killport() {
3131
elif [ -x "$(command -v lsof)" ]; then
3232
for pid in $(lsof -t "-i:$port" || true); do
3333
echo "Killing pid $pid for port $port using kill" 1>&2
34-
kill "$pid" -SIGKILL || true
34+
kill -SIGKILL "$pid" || true
3535
done
3636
elif [ -x "$(command -v fuser)" ]; then
3737
echo "Killing process using port $port using fuser" 1>&2
3838
fuser --kill "$port/tcp" || true
3939
elif [ -x "$(command -v ss)" ]; then
4040
for pid in $(ss -tlnp "sport = :$port" | awk 'NR>1 {split($7,a,","); print a[1]}' | tr -d '[:space:]'); do
4141
echo "Killing pid $pid for port $port using kill" 1>&2
42-
kill "$pid" -SIGKILL || true
42+
kill -SIGKILL "$pid" || true
4343
done
4444
else
4545
echo "Unable to identify the OS (${OSTYPE:?}) or find necessary utilities (fuser/lsof/ss) to kill the process."

0 commit comments

Comments
 (0)