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

Function register

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

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

(pid: u32)

Source from the content-addressed store, hash-verified

19/// Add `pid` to the supervised-child set. Non-positive or out-of-range values
20/// are silently ignored.
21pub fn register(pid: u32) {
22 let Ok(pid) = i32::try_from(pid) else {
23 return;
24 };
25 if pid <= 0 {
26 return;
27 }
28 if let Ok(mut children) = MANAGED_CHILDREN.lock() {
29 children.insert(pid);
30 }
31}
32
33/// Remove `pid` from the supervised-child set. Non-positive or out-of-range
34/// values are silently ignored.

Callers 3

spawn_implMethod · 0.85
spawn_pty_shellFunction · 0.85
spawn_pipe_execFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected