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

Function close_fd_and_raise

crates/vm/src/stdlib/nt.rs:2004–2007  ·  view source on GitHub ↗
(fd: i32, err: std::io::Error, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

2002 /// Close fd and convert error to PyException (PEP 446 cleanup)
2003 #[cold]
2004 fn close_fd_and_raise(fd: i32, err: std::io::Error, vm: &VirtualMachine) -> PyBaseExceptionRef {
2005 let _ = unsafe { crt_fd::Owned::from_raw(fd) };
2006 err.to_pyexception(vm)
2007 }
2008
2009 #[pyfunction]
2010 fn umask(mask: i32, vm: &VirtualMachine) -> PyResult<i32> {

Callers 2

dupFunction · 0.85
dup2Function · 0.85

Calls 1

to_pyexceptionMethod · 0.45

Tested by

no test coverage detected