Skip to content

Update Fuchsia support for std::process. #39277

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

Merged
merged 1 commit into from
Jan 25, 2017

Conversation

tedsta
Copy link
Contributor

@tedsta tedsta commented Jan 24, 2017

  • Adds support for try_wait.
  • Miscellaneous updates to keep up with Magenta changes.

I'll begin sys/fuchsia soon, just been bogged down with my actual job lately (I'm not on the Fuchsia team).

@rust-highfive
Copy link
Contributor

r? @alexcrichton

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

@tedsta tedsta changed the title Updated Fuchsia support for std::process. Update Fuchsia support for std::process. Jan 24, 2017
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Jan 24, 2017

📌 Commit bbe419f has been approved by alexcrichton

@raphlinus
Copy link
Contributor

Looks good to me too, but I didn't do a careful review.

@bors
Copy link
Collaborator

bors commented Jan 25, 2017

⌛ Testing commit bbe419f with merge 185d908...

bors added a commit that referenced this pull request Jan 25, 2017
Update Fuchsia support for std::process.

- Adds support for try_wait.
- Miscellaneous updates to keep up with Magenta changes.

I'll begin `sys/fuchsia` soon, just been bogged down with my actual job lately (I'm not on the Fuchsia team).
@bors
Copy link
Collaborator

bors commented Jan 25, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 185d908 to master...

@bors bors merged commit bbe419f into rust-lang:master Jan 25, 2017
Copy link
Member

@solson solson left a comment

Choose a reason for hiding this comment

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

I know this is already merged, but I thought I'd leave a couple style notes for future reference.

extern {
pub fn mxio_get_startup_handle(id: u32) -> mx_handle_t;
pub fn mx_job_default() -> mx_handle_t {
unsafe { return __magenta_job_default; }
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Just use unsafe { __magenta_job_default }. Idiomatic Rust only uses return for early returns.


#[allow(unused)] pub const ERR_INTERNAL: mx_status_t = -1;

// ERR_NOT_SUPPORTED: The operation is not implemented, supported,
Copy link
Member

Choose a reason for hiding this comment

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

This and all the following comments that document these constants should use the triple slash /// which rustdoc recognizes as a doc comment and uses in the generated HTML.

0, ptr::null_mut());
match status {
0 => { }, // Success
x if x == ERR_TIMED_OUT => {
Copy link
Member

Choose a reason for hiding this comment

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

I believe you can use constants directly as patterns, so this arm could be written as just ERR_TIMED_OUT => { with no x if x ==.

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