Skip to content
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

std: Remove final usage of fds from Windows #24426

Merged
merged 1 commit into from
Apr 15, 2015

Conversation

alexcrichton
Copy link
Member

This commit removes the last remnants of file descriptors from the Windows
implementation of std::sys by using CreatePipe to create anonymous pipes
instead of the pipe shim provided in msvcrt.

@rust-highfive
Copy link
Collaborator

r? @pcwalton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

r? @aturon

cc @retep998

@rust-highfive rust-highfive assigned aturon and unassigned pcwalton Apr 14, 2015
let mut reader = libc::INVALID_HANDLE_VALUE;
let mut writer = libc::INVALID_HANDLE_VALUE;
try!(cvt(unsafe {
c::CreatePipe(&mut reader, &mut writer, 0 as *mut _, 1024)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I'd just set the buffer size to 0 to use the OS default.

@retep998
Copy link
Member

Implementation looks good to me.

This commit removes the last remnants of file descriptors from the Windows
implementation of `std::sys` by using `CreatePipe` to create anonymous pipes
instead of the `pipe` shim provided in msvcrt.
@aturon
Copy link
Member

aturon commented Apr 15, 2015

Oh happy days! Especially nice to see the drop changes.

@bors: r+

@bors
Copy link
Contributor

bors commented Apr 15, 2015

📌 Commit 5e07329 has been approved by aturon

@bors
Copy link
Contributor

bors commented Apr 15, 2015

⌛ Testing commit 5e07329 with merge a691f1e...

bors added a commit that referenced this pull request Apr 15, 2015
This commit removes the last remnants of file descriptors from the Windows
implementation of `std::sys` by using `CreatePipe` to create anonymous pipes
instead of the `pipe` shim provided in msvcrt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants