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

Function unregister

crates/openshell-supervisor-process/src/managed_children.rs:35–45  ·  view source on GitHub ↗

Remove `pid` from the supervised-child set. Non-positive or out-of-range values are silently ignored.

(pid: u32)

Source from the content-addressed store, hash-verified

33/// Remove `pid` from the supervised-child set. Non-positive or out-of-range
34/// values are silently ignored.
35pub fn unregister(pid: u32) {
36 let Ok(pid) = i32::try_from(pid) else {
37 return;
38 };
39 if pid <= 0 {
40 return;
41 }
42 if let Ok(mut children) = MANAGED_CHILDREN.lock() {
43 children.remove(&pid);
44 }
45}
46
47/// Return `true` if `pid` is currently in the supervised-child set.
48#[must_use]

Callers 4

waitMethod · 0.85
dropMethod · 0.85
spawn_pty_shellFunction · 0.85
spawn_pipe_execFunction · 0.85

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected