(vm: &VirtualMachine, name: &str)
| 1112 | } |
| 1113 | |
| 1114 | fn semaphore_name(vm: &VirtualMachine, name: &str) -> PyResult<CString> { |
| 1115 | // POSIX semaphore names must start with / |
| 1116 | let mut full = String::with_capacity(name.len() + 1); |
| 1117 | if !name.starts_with('/') { |
| 1118 | full.push('/'); |
| 1119 | } |
| 1120 | full.push_str(name); |
| 1121 | CString::new(full).map_err(|_| vm.new_value_error("embedded null character")) |
| 1122 | } |
| 1123 | |
| 1124 | fn handle_wait_error(vm: &VirtualMachine, saved_errno: Errno) -> PyResult<bool> { |
| 1125 | match saved_errno { |
no test coverage detected