Remove `pid` from the supervised-child set. Non-positive or out-of-range values are silently ignored.
(pid: u32)
| 33 | /// Remove `pid` from the supervised-child set. Non-positive or out-of-range |
| 34 | /// values are silently ignored. |
| 35 | pub 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] |
no test coverage detected