Function mkfifo
fn mkfifo<P: ?Sized + NixPath>(path: &P, mode: Mode) -> Result<()>
Creates new FIFO special file (named pipe) with path path and access rights mode.
Errors
There are several situations where mkfifo might fail:
- current user has insufficient rights in the parent directory
- the path already exists
- the path name is too long (longer than
PATH_MAX, usually 4096 on linux, 1024 on OS X)
For a full list consult posix specification
Example
use unistd;
use stat;
use tempdir;
let tmp_dir = tempdir.unwrap;
let fifo_path = tmp_dir.path.join;
// create new fifo and give read, write and execute rights to the owner
match mkfifo