From 9cd16b34658518b670407b832ec152250d1d5a46 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 26 Feb 2022 21:35:29 +0100 Subject: shutdownasap: use /proc/$pid instead of kill -0 $pid --- shutdownasap.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shutdownasap.in b/shutdownasap.in index 3f2b90b..ba092f6 100755 --- a/shutdownasap.in +++ b/shutdownasap.in @@ -28,7 +28,7 @@ while [ $# -gt 0 ]; do if [ -r "${tmpDir}/intention" ] \ && grep -qxF 'shutdown' "${tmpDir}/intention" \ && [ -r "${tmpDir}/pid" ] \ - && kill -0 "$(cat "${tmpDir}/pid")"; then + && [ -d "/proc/$(cat "${tmpDir}/pid")" ]; then exit fi echo 'reboot' >"${tmpDir}/intention" -- cgit v1.2.3-54-g00ecf