quote variable

This commit is contained in:
Jérémy Lecour 2020-04-21 09:03:01 +02:00 committed by Jérémy Lecour
parent ea912c40f0
commit 4829232a65
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ kill_or_clean_lockfile() {
# Get Process ID from the lock file
pid=$(cat "${lock_file}")
if [ -n "${pid}" ]; then
if kill -0 ${pid} 2> /dev/null; then
if kill -0 "${pid}" 2> /dev/null; then
# Kill the children
pkill -9 --parent "${pid}"
# Kill the parent