Selaa lähdekoodia

Replace kill with ps in process existence check

kill returns the same status whether a process doesn't exist or the current user doesn't have permission to kill, so the script returned a confusing error message in the latter case.
master
JustAnotherArchivist 6 vuotta sitten
vanhempi
commit
632fbcb4d0
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. +1
    -1
      kill-wpull-connections

+ 1
- 1
kill-wpull-connections Näytä tiedosto

@@ -42,7 +42,7 @@ then
exit 1
fi

if ! kill -0 ${wpullPid} >/dev/null 2>&1
if ! ps -p ${wpullPid} >/dev/null 2>&1
then
echo "Error: no process with PID ${wpullPid}"
exit 1


Ladataan…
Peruuta
Tallenna