diff options
author | Erich Eckner <git@eckner.net> | 2022-02-26 21:47:19 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2022-02-26 21:47:19 +0100 |
commit | 71e873f4e813be09bdf4d9198faf8622de43b81d (patch) | |
tree | bb2e63b3fb51899c7647a6eb6459f2f980434ead | |
parent | 23b973c2a2e644560c320f9f2b4db13796106589 (diff) | |
download | update-all-71e873f4e813be09bdf4d9198faf8622de43b81d.tar.xz |
update-all: use /proc/$pid instead of kill -0 $pid
-rw-r--r-- | update-all.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/update-all.in b/update-all.in index 8e8a211..6d36bb2 100644 --- a/update-all.in +++ b/update-all.in @@ -95,7 +95,7 @@ fi while [ -n "${pids[*]}" ]; do if [ -z "${DISPLAY}" ]; then for pid in "${pids[@]}"; do - if ! kill -0 "${pid}" >/dev/null 2>&1; then + if ! [ -d "/proc/${pid}" ]; then continue fi npids+=("${pid}") @@ -108,7 +108,7 @@ while [ -n "${pids[*]}" ]; do pids=( $( for pid in "${pids[@]}"; do - if kill -0 "${pid}" >/dev/null 2>&1; then + if [ -d "/proc/${pid}" ]; then printf '%s\n' "${pid}" fi done |