-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4133 from geetanshjuneja/ioctl2
Supported fioclex for ioctl on macos
- Loading branch information
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//@ignore-target: windows | ||
|
||
#![feature(anonymous_pipe)] | ||
use std::io::{Read, Write}; | ||
|
||
fn main() { | ||
let (mut ping_rx, mut ping_tx) = std::pipe::pipe().unwrap(); | ||
ping_tx.write(b"hello").unwrap(); | ||
let mut buf: [u8; 5] = [0; 5]; | ||
ping_rx.read(&mut buf).unwrap(); | ||
assert_eq!(&buf, "hello".as_bytes()); | ||
} |