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

Function parse_pids_max

crates/openshell-supervisor-process/src/process.rs:145–156  ·  view source on GitHub ↗
(contents: &str)

Source from the content-addressed store, hash-verified

143
144#[cfg(target_os = "linux")]
145fn parse_pids_max(contents: &str) -> RuntimePidLimitStatus {
146 let raw = contents.trim();
147 if raw.eq_ignore_ascii_case("max") {
148 return RuntimePidLimitStatus::Unlimited;
149 }
150 match raw.parse::<u64>() {
151 Ok(limit) => RuntimePidLimitStatus::Limited(limit),
152 Err(err) => {
153 RuntimePidLimitStatus::Unavailable(format!("invalid pids.max value {raw:?}: {err}"))
154 }
155 }
156}
157
158#[cfg(target_os = "linux")]
159fn drop_capability_bounding_set() -> Result<()> {

Callers 2

runtime_pid_limit_statusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected