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

Function pipe_with

src/backend/libc/pipe/syscalls.rs:44–54  ·  view source on GitHub ↗
(flags: PipeFlags)

Source from the content-addressed store, hash-verified

42 target_os = "wasi"
43)))]
44pub(crate) fn pipe_with(flags: PipeFlags) -> io::Result<(OwnedFd, OwnedFd)> {
45 unsafe {
46 let mut result = MaybeUninit::<[OwnedFd; 2]>::uninit();
47 ret(c::pipe2(
48 result.as_mut_ptr().cast::<i32>(),
49 bitflags_bits!(flags),
50 ))?;
51 let [p0, p1] = result.assume_init();
52 Ok((p0, p1))
53 }
54}
55
56#[cfg(linux_kernel)]
57#[inline]

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