From 811deb3ab4337a14a5a9d44b5ff59fefff84bff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20A=2E=20Bellone?= Date: Wed, 24 Jul 2024 21:08:24 -0300 Subject: [PATCH] Redirect stderr of kill command to stdout --- hooks/pre-exit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/pre-exit b/hooks/pre-exit index 13ce272..33dc720 100755 --- a/hooks/pre-exit +++ b/hooks/pre-exit @@ -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"