From 0c9d76ce3225c12c91552954ecde430db0d16f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 24 Sep 2026 22:42:44 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20chore(scripts):=20the=20runner?= =?UTF-8?q?=20copy=20leaves=20edith=20=E2=80=94=20it=20was=20never=20this?= =?UTF-8?q?=20repo's=20tooling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/memguard-runner.sh | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100755 scripts/memguard-runner.sh diff --git a/scripts/memguard-runner.sh b/scripts/memguard-runner.sh deleted file mode 100755 index 78161c6..0000000 --- a/scripts/memguard-runner.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# Wraps a test/bin invocation in a transient user cgroup scope so a runaway -# allocation dies inside its own cgroup instead of triggering a machine-wide -# OOM kill. Used as the cargo target runner (see .cargo/config.toml) so every -# `cargo test`/`cargo run` invocation of this workspace is capped, from any -# checkout (main repo or worktree). -set -euo pipefail - -if [ "${EC_NOMEMGUARD:-0}" = "1" ]; then - echo "memguard-runner: EC_NOMEMGUARD=1, running without memory cap" >&2 - exec "$@" -fi - -if ! systemd-run --user --scope --quiet -p MemoryMax=10G true >/dev/null 2>&1; then - echo "memguard-runner: systemd-run --user --scope unavailable, running without memory cap" >&2 - exec "$@" -fi - -exec systemd-run --user --scope --quiet --same-dir \ - -p MemoryMax=10G -p MemorySwapMax=2G \ - -- "$@"