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

Method from_socket_path

crates/openshell-supervisor-process/src/process.rs:214–221  ·  view source on GitHub ↗
(socket_path: &str)

Source from the content-addressed store, hash-verified

212#[cfg(target_os = "linux")]
213impl SupervisorIdentityMountNamespace {
214 fn from_socket_path(socket_path: &str) -> Result<Option<Self>> {
215 let Some(target) = supervisor_identity_mount_target(socket_path)? else {
216 return Ok(None);
217 };
218 Ok(Some(Self {
219 fd: create_supervisor_identity_mount_namespace(&target)?,
220 }))
221 }
222
223 pub fn enter_for_child(&self) -> std::io::Result<()> {
224 set_mount_namespace(self.fd.as_raw_fd())

Callers

nothing calls this directly

Tested by

no test coverage detected