add wust typr mpc and mutipule x

This commit is contained in:
cyy_mac
2026-03-27 03:41:42 +08:00
parent 2c64655fae
commit 7dcb53bb77
192 changed files with 29571 additions and 9 deletions

View File

@@ -0,0 +1,24 @@
#!/bin/bash
TARGET="$1"
shift
ARGS=("${@:3}")
echo "[GUARD] target: $TARGET"
echo "[GUARD] args: ${ARGS[*]}"
echo "[GUARD] Starting monitor..."
while true; do
echo "[GUARD] Launching program..."
"$TARGET" "${ARGS[@]}"
RET=$?
if [ $RET -eq 0 ]; then
echo "[GUARD] Program exited normally. Stopping guard."
exit 0
fi
echo "[GUARD] Crash detected, restarting in 1 second..."
sleep 1
done