Skip to main content

REAP_SCRIPT

Constant REAP_SCRIPT 

Source
const REAP_SCRIPT: &str = r#"pkill -KILL -f "$1" || true
i=0
while pgrep -f "$1" >/dev/null 2>&1; do
    i=$((i+1))
    if [ "$i" -gt 20 ]; then echo alive; exit 1; fi
    sleep 0.5
done
echo gone"#;
Expand description

$1 the process pattern.