Skip to content

Commit

Permalink
Redirect stderr of kill command to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
toote committed Jul 25, 2024
1 parent d7edaa9 commit 811deb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hooks/pre-exit
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ find_and_upload() {

for index in "${!uploads_in_progress[@]}"; do
# Note: kill -0 does not kill the pid, it provides a *nix compatible way to test the pid is responding.
if ! kill -0 "${uploads_in_progress[index]}" > /dev/null; then
if ! kill -0 "${uploads_in_progress[index]}" > /dev/null 2>&1; then
unset 'uploads_in_progress[index]'
elif [[ "$iterations_waited" -gt $TIMEOUT ]]; then
echo "Upload '${uploads_in_progress[index]}' has been running for more than '${TIMEOUT}' seconds, killing it"
Expand Down

0 comments on commit 811deb3

Please sign in to comment.