Add `pid` to the supervised-child set. Non-positive or out-of-range values are silently ignored.
(pid: u32)
| 19 | /// Add `pid` to the supervised-child set. Non-positive or out-of-range values |
| 20 | /// are silently ignored. |
| 21 | pub 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. |
no outgoing calls
no test coverage detected