Function
raw_set_handle_inheritable
(handle: intptr_t, inheritable: bool)
Source from the content-addressed store, hash-verified
| 1811 | } |
| 1812 | |
| 1813 | pub fn raw_set_handle_inheritable(handle: intptr_t, inheritable: bool) -> std::io::Result<()> { |
| 1814 | let flags = if inheritable { |
| 1815 | Foundation::HANDLE_FLAG_INHERIT |
| 1816 | } else { |
| 1817 | 0 |
| 1818 | }; |
| 1819 | let res = unsafe { |
| 1820 | Foundation::SetHandleInformation(handle as _, Foundation::HANDLE_FLAG_INHERIT, flags) |
| 1821 | }; |
| 1822 | if res == 0 { |
| 1823 | Err(std::io::Error::last_os_error()) |
| 1824 | } else { |
| 1825 | Ok(()) |
| 1826 | } |
| 1827 | } |
| 1828 | |
| 1829 | #[pyfunction] |
| 1830 | fn listdrives(vm: &VirtualMachine) -> PyResult<PyListRef> { |
Tested by
no test coverage detected