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: Implement lowering and raising for process IO #25494

Merged
merged 1 commit into from May 29, 2015

Conversation

Projects
None yet
5 participants
@alexcrichton
Copy link
Member

alexcrichton commented May 16, 2015

This commit implements a number of standard traits for the standard library's
process I/O handles. The FromRaw{Fd,Handle} traits are now implemented for the
Stdio type and the AsRaw{Fd,Handle} traits are now implemented for the
Child{Stdout,Stdin,Stderr} types.

The stability markers for these implementations mention that they are stable for
1.1 as I will nominate this commit for cherry-picking to beta.

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented May 16, 2015

r? @aturon

@rust-highfive rust-highfive assigned aturon and unassigned brson May 16, 2015

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented May 16, 2015

r? @brson

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

@alexcrichton alexcrichton force-pushed the alexcrichton:stdio-from-raw branch from 0f35ebc to af69f4e May 16, 2015

std: Implement lowering and raising for process IO
This commit implements a number of standard traits for the standard library's
process I/O handles. The `FromRaw{Fd,Handle}` traits are now implemented for the
`Stdio` type and the `AsRaw{Fd,Handle}` traits are now implemented for the
`Child{Stdout,Stdin,Stderr}` types. Additionally this implements the
`AsRawHandle` trait for `Child` on Windows.

The stability markers for these implementations mention that they are stable for
1.1 as I will nominate this commit for cherry-picking to beta.

@alexcrichton alexcrichton force-pushed the alexcrichton:stdio-from-raw branch 4 times, most recently from b3db491 to 3dd3450 May 16, 2015

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented May 28, 2015

ping r? @aturon

/// Note that this function **does not** take ownership of the file
/// descriptor provided and it will **not** be closed when `Stdio` goes out
/// of scope. As a result this method is unsafe because due to the lack of
/// knowledge about the lifetime of the provided file descriptor, this could

This comment has been minimized.

@aturon

aturon May 29, 2015

Member

I feel slightly uneasy about this comment, as it directly contradicts the documentation for the trait.

It would be good to be more crisp about the story here.

@aturon

This comment has been minimized.

Copy link
Member

aturon commented May 29, 2015

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented May 29, 2015

📌 Commit 3dd3450 has been approved by aturon

@aturon

This comment has been minimized.

Copy link
Member

aturon commented May 29, 2015

(I'm assuming we still intend to backport; if not, feel free to r- and update stability markers.)

@bors

This comment has been minimized.

Copy link
Contributor

bors commented May 29, 2015

⌛️ Testing commit 3dd3450 with merge 996fb8d...

bors added a commit that referenced this pull request May 29, 2015

Auto merge of #25494 - alexcrichton:stdio-from-raw, r=aturon
This commit implements a number of standard traits for the standard library's
process I/O handles. The `FromRaw{Fd,Handle}` traits are now implemented for the
`Stdio` type and the `AsRaw{Fd,Handle}` traits are now implemented for the
`Child{Stdout,Stdin,Stderr}` types.

The stability markers for these implementations mention that they are stable for
1.1 as I will nominate this commit for cherry-picking to beta.

@bors bors merged commit 3dd3450 into rust-lang:master May 29, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jun 9, 2015

triage: not accepted for beta

@alexcrichton alexcrichton deleted the alexcrichton:stdio-from-raw branch Jun 9, 2015

bors added a commit that referenced this pull request Jun 11, 2015

Auto merge of #26159 - alexcrichton:tweak-process-lowering-raising, r…
…=brson

* Slate these features to be stable in 1.2 instead of 1.1 (not being backported)
* Have the `FromRawFd` implementations follow the contract of the `FromRawFd`
  trait by taking ownership of the primitive specified.
* Refactor the implementations slightly to remove the `unreachable!` blocks as
  well as separating the stdio representation of `std::process` from
  `std::sys::process`.

cc #25494
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.