(path: P)
| 16 | use tokio_util::codec::{FramedRead, LengthDelimitedCodec}; |
| 17 | |
| 18 | fn 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 | |
| 28 | pub struct GenericFifo { |
| 29 | ctl_path: PathBuf, |