Just use /proc to see if a process is running
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user