summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2022-02-26 21:47:19 +0100
committerErich Eckner <git@eckner.net>2022-02-26 21:47:19 +0100
commit71e873f4e813be09bdf4d9198faf8622de43b81d (patch)
treebb2e63b3fb51899c7647a6eb6459f2f980434ead
parent23b973c2a2e644560c320f9f2b4db13796106589 (diff)
downloadupdate-all-71e873f4e813be09bdf4d9198faf8622de43b81d.tar.xz
update-all: use /proc/$pid instead of kill -0 $pid
-rw-r--r--update-all.in4
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