Created
January 22, 2026 02:53
-
-
Save skorotkiewicz/a7502524874ad00761f95257a21bfda0 to your computer and use it in GitHub Desktop.
antigravity fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| UNIT_NAME="antigravity-$(date +%s)" | |
| APP_BIN="/usr/bin/antigravity" | |
| TRIGGER="Extension host with pid" | |
| echo "[*] Start as: $UNIT_NAME" | |
| # Build the command with all arguments properly quoted | |
| if [ $# -eq 0 ]; then | |
| # No arguments provided | |
| CMD="$APP_BIN" | |
| else | |
| # Arguments provided - pass them through | |
| CMD="$APP_BIN $(printf '%q ' "$@")" | |
| fi | |
| systemd-run --user \ | |
| --scope \ | |
| --unit="$UNIT_NAME" \ | |
| --property=KillMode=control-group \ | |
| /bin/bash -c "exec prlimit --core=0 $CMD 2>&1 | systemd-cat --identifier=$UNIT_NAME" & | |
| journalctl --user --identifier="$UNIT_NAME" --follow | | |
| grep --line-buffered --max-count=1 "$TRIGGER" && | |
| systemctl --user kill --signal=SIGKILL "$UNIT_NAME.scope" | |
| echo "[*] Remaining processes are killed." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment