MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / die_with_parent

Function die_with_parent

crates/openshell-driver-vm/src/procguard.rs:42–44  ·  view source on GitHub ↗

Cross-platform "die when my parent dies" primitive. The VM driver spawns a chain of subprocesses (compute driver → `--internal-run-vm` launcher → gvproxy + libkrun fork). If any link in that chain is killed with SIGKILL — or simply crashes — the children are reparented to init and survive indefinitely, leaking libkrun workers and gvproxy instances. This module exposes two functions: [`die_with_p

()

Source from the content-addressed store, hash-verified

40/// that needs to drain state; we are a VM launcher / gRPC driver whose
41/// entire job is tied to the parent's lifetime.
42pub fn die_with_parent() -> Result<(), String> {
43 die_with_parent_cleanup(|| ())
44}
45
46/// Like [`die_with_parent`], but run `cleanup` before terminating.
47///

Callers 2

mainFunction · 0.85
run_libkrun_vmFunction · 0.85

Calls 1

die_with_parent_cleanupFunction · 0.85

Tested by

no test coverage detected