Repository navigation
Releases: digivasserver-ai/durable-sh
Releases · digivasserver-ai/durable-sh
Release list
v0.1.0 — Signal-36 hardened shell primitives
First tagged release.
durable.sh is a single-file, dependency-free bash library for environments where
short-lived processes get killed — notably Android/Termux, where traced_perf
delivers signal 36 (SIGRTMIN+2) and the default disposition is terminate.
What's in it
trap '' 36immunity —SIG_IGNis inherited across fork+exec and cannot be
reset by children, so one line protects every descendant.- Atomic writes —
durable::atomic_write/durable::atomic_write_str
(tmp on the same filesystem +mv), so a kill leaves a missing file instead of
a truncated live one. - Parent-shell retries —
durable::retryretries in the parent, not in a
subshell that inherits the kill. - Git hardening — stale
index.lockrecovery, and rc disambiguation for
git diff --cached --quiet(0 clean / 1 changes / >1 killed). - Supervision helpers — liveness by process pattern, never by trusting a
pidfile.
Verification
bash tests/run_tests.sh→ 18/18 pass- Kill-rate measurements in the README: 0/40 at
sleep 0.001, 6/40 at 0.2 s,
~12% at 3 s — risk plateaus, so longer processes buy nothing.
Install
git clone https://github.com/digivasserver-ai/durable-sh.git
source durable-sh/lib/durable.shMIT licensed.