MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / pipe

Function pipe

src/backend/libc/pipe/syscalls.rs:26–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25#[cfg(not(target_os = "wasi"))]
26pub(crate) fn pipe() -> io::Result<(OwnedFd, OwnedFd)> {
27 unsafe {
28 let mut result = MaybeUninit::<[OwnedFd; 2]>::uninit();
29 ret(c::pipe(result.as_mut_ptr().cast::<i32>()))?;
30 let [p0, p1] = result.assume_init();
31 Ok((p0, p1))
32 }
33}
34
35#[cfg(not(any(
36 apple,

Callers

nothing calls this directly

Calls 3

assume_initMethod · 0.80
retFunction · 0.50
as_mut_ptrMethod · 0.45

Tested by

no test coverage detected