MCPcopy Index your code
hub / github.com/RustPython/RustPython / open_existing

Method open_existing

crates/stdlib/src/multiprocessing.rs:578–586  ·  view source on GitHub ↗
(name: &str, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

576 }
577
578 fn open_existing(name: &str, vm: &VirtualMachine) -> PyResult<Self> {
579 let cname = semaphore_name(vm, name)?;
580 let raw = unsafe { libc::sem_open(cname.as_ptr(), 0) };
581 if raw == libc::SEM_FAILED {
582 let err = Errno::last();
583 return Err(os_error(vm, err));
584 }
585 Ok(SemHandle { raw })
586 }
587
588 #[inline]
589 fn as_ptr(&self) -> *mut sem_t {

Callers

nothing calls this directly

Calls 4

semaphore_nameFunction · 0.85
os_errorFunction · 0.85
ErrClass · 0.50
as_ptrMethod · 0.45

Tested by

no test coverage detected