forked from rust-lang/jobserver-rs
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Remove second param of `set_nonblocking` since it is always set to `true` - Remove `is_pipe_without_access_mode_check`, change `is_pipe` to only take one parameter and add fn `get_access_mode` for checking access mode separately. - Use `ManuallyDrop::new(File::from_raw_fd(..))` to construct a `File` with no `Drop` so that we can call its `metadata()` and its `try_clone()` fn without having to implement them ourselves using `unsafe` code in `dup*`. - Fixed checking access mode of pipe fds: O_RDWR should also be accepted. Signed-off-by: Jiahao XU <[email protected]>
- Loading branch information
Showing
1 changed file
with
49 additions
and
92 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