diff options
author | Erich Eckner <git@eckner.net> | 2022-02-26 21:35:29 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2022-02-26 21:35:29 +0100 |
commit | 9cd16b34658518b670407b832ec152250d1d5a46 (patch) | |
tree | aebd49122ce76b1cc5db405dc7e4ba975c14f574 /shutdownasap.in | |
parent | 28c089933e910065b8a332b786d111d2b9646545 (diff) | |
download | shutdownasap-9cd16b34658518b670407b832ec152250d1d5a46.tar.xz |
shutdownasap: use /proc/$pid instead of kill -0 $pid
Diffstat (limited to 'shutdownasap.in')
-rwxr-xr-x | shutdownasap.in | 2 |
1 files changed, 1 insertions, 1 deletions
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" |