diff --git a/roles/taskotron/imagefactory/files/imagefactory-kill-zombie b/roles/taskotron/imagefactory/files/imagefactory-kill-zombie index 5a5deb0c96..b5d76df3ed 100755 --- a/roles/taskotron/imagefactory/files/imagefactory-kill-zombie +++ b/roles/taskotron/imagefactory/files/imagefactory-kill-zombie @@ -18,7 +18,7 @@ TIMEOUT=${1:-$DEFAULT_TIMEOUT} # convert to seconds TIMEOUT=$(( $TIMEOUT * 60 )) -while pgrep -f "$PROCESS_ID"; do +while true; do # get PID of the oldest (pgrep -o) running matched process PID=$(pgrep -o -f "$PROCESS_ID") if [ -z "$PID" ]; then