BashGuardProvision class final

The per-process bash guard: a private temp dir holding the PATH shims and the protected pid set injected into every bash tool call. shimDir is null when no shim applied (pkill/killall/pgrep missing on the host) — the pid set still arms the kill() prelude.

The shim dir is deliberately NOT deleted at process exit: a concurrent bash call in another fa process may be mid-lookup, and unlinking under it would turn pkill into an exec failure. Cost: one ~2 KB dir per fa process launch in $TMPDIR (OS tmp reapers bound it).

Constructors

BashGuardProvision({required String? shimDir, required List<int> protectedPids})
Creates the provision. Never throws on the caller side: provisioning failures degrade to a null provision instead.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
protectedPids → List<int>
The protected pids: the harness pid, its ancestor chain up to init, and the harness process group.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shimDir → String?
Private temp dir (0700) with the executable pkill/killall shims; prepended to PATH. Null when no shim applies.
final

Methods

environmentOverlay() → Map<String, String>
The env/PATH overlay for a bash tool spawn: bashGuardPidsEnv plus the shim dir at the head of PATH (in front of any inherited or widened PATH, so the shims always win).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited