MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / create_fifo

Function create_fifo

src/executor/shared/fifo.rs:18–26  ·  view source on GitHub ↗
(path: P)

Source from the content-addressed store, hash-verified

16use tokio_util::codec::{FramedRead, LengthDelimitedCodec};
17
18fn create_fifo<P: AsRef<std::path::Path>>(path: P) -> anyhow::Result<()> {
19 // Remove the previous FIFO (if it exists)
20 let _ = nix::unistd::unlink(path.as_ref());
21
22 // Create the FIFO with RWX permissions for the owner
23 nix::unistd::mkfifo(path.as_ref(), nix::sys::stat::Mode::S_IRWXU)?;
24
25 Ok(())
26}
27
28pub struct GenericFifo {
29 ctl_path: PathBuf,

Callers 2

newMethod · 0.85
openMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected