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

Function pipe

crates/vm/src/stdlib/posix.rs:1187–1193  ·  view source on GitHub ↗
(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1185
1186 #[pyfunction]
1187 fn pipe(vm: &VirtualMachine) -> PyResult<(OwnedFd, OwnedFd)> {
1188 use nix::unistd::pipe;
1189 let (rfd, wfd) = pipe().map_err(|err| err.into_pyexception(vm))?;
1190 set_inheritable(rfd.as_fd(), false, vm)?;
1191 set_inheritable(wfd.as_fd(), false, vm)?;
1192 Ok((rfd, wfd))
1193 }
1194
1195 // cfg from nix
1196 #[cfg(any(

Callers

nothing calls this directly

Calls 3

set_inheritableFunction · 0.70
into_pyexceptionMethod · 0.45
as_fdMethod · 0.45

Tested by

no test coverage detected