Just use /proc to see if a process is running

This commit is contained in:
Jack L. Frost 2016-03-29 19:21:53 +03:00
parent 69a1c39cbc
commit 987c655fcc
2 changed files with 2 additions and 1 deletions

View File

@ -5,3 +5,4 @@ A simple rc script to kickstart your system.
## depends
* Enabled sysrq or halt from suckless.org's ubase.
* /proc support.

View File

@ -39,7 +39,7 @@ get_procs_to_kill() {
pids_exist() {
for i in "$@"; do
if kill -0 "$i" 2>/dev/null; then
if [[ -d "/proc/$i" ]]; then
return 0
fi
done