-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impl new API std::os::unix::fs::mkfifo
under feature unix_fifo
#139450
base: master
Are you sure you want to change the base?
Conversation
Tracking issue rust-lang#139324 Signed-off-by: Jiahao XU <[email protected]>
The job Click to see the possible cause of the failure (guessed by this bot)
|
@@ -1100,3 +1100,36 @@ pub fn lchown<P: AsRef<Path>>(dir: P, uid: Option<u32>, gid: Option<u32>) -> io: | |||
pub fn chroot<P: AsRef<Path>>(dir: P) -> io::Result<()> { | |||
sys::fs::chroot(dir.as_ref()) | |||
} | |||
|
|||
/// Create fifo at the specified path with the specified mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "Create a FIFO special file at the specified path..."
/// # }; | ||
/// # fn main() -> std::io::Result<()> { | ||
/// # remove_file("/tmp/fifo")?; | ||
/// mkfifo("/tmp/fifo", Permissions::from_mode(0o774))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this test is to be run (I think it's a good idea to have some form of test), it may be better to call mkdtemp
and create the FIFO there to ensure it doesn't interfere with anyone who actually has a /tmp/fifo
.
@rustbot author for the failing test and review |
Reminder, once the PR becomes ready for a review, use |
Tracking issue #139324