pub fn run_with_backend_timeout(
command: Command,
config: DetConfig,
print_summary: bool,
print_summary_to_json_file: &Option<PathBuf>,
backend: Backend,
timeout: Option<Duration>,
) -> Result<ExitStatus, Error>Expand description
run_with_backend with a hermit-enforced wall-clock bound on the guest.
On ptrace it needs no particular stack from the calling thread; see run.
This library never installs a process alarm. Ordinary ptrace keeps the
original runtime, operation, failed GlobalState and backing guards when a
finite cleanup attempt is unconfirmed; downcast HermitCleanupUnconfirmed
and recover it on the original process/thread. A timeout is measured before
startup and is not a certificate of cleanup. None leaves execution
unbounded, but fatal cleanup attempts remain finite. Nonordinary backends
retain their existing cooperative timeout/drop semantics. Synchronous stalls
require caller-owned supervision; only the CLI owns its hard alarm fallback.
⚠️ NOT PART OF DetConfig, DELIBERATELY. A wall-clock bound is host state,
and DetConfig is the determinism configuration that is serialized to disk
and reasoned about as guest-visible. Threading a real-time deadline through
it would put a nondeterministic quantity inside the structure whose entire
job is to exclude them.