Skip to content

Conversation

mbarnett
Copy link
Contributor

Adds the various process test macros specified in the wait(2) manpage on OS X. WCOREDUMP is implemented BSD-wide as it seems to be the only macro whose definition is constant across the BSDs.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

status >> 8
}

pub fn WSTATUS(status: ::c_int) -> ::c_int {
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't look like it's a #define in sys/wait.h for me, but there's a _WSTATUS, so maybe this is an internal function?

@alexcrichton
Copy link
Member

Thanks! Just one small nit but otherwise lgtm

@mbarnett
Copy link
Contributor Author

Good call. I've pushed a change to rename it to _WSTATUS to match the header, but the obvious other solution here is to just repeat the (status & 0x7f) mask in each of the macros if that is undesirable.

@alexcrichton
Copy link
Member

@bors: r+ 06abf3a

Sounds good to me!

@bors
Copy link
Contributor

bors commented Apr 29, 2016

⌛ Testing commit 06abf3a with merge 6ad1be7...

bors added a commit that referenced this pull request Apr 29, 2016
OS X: add various process status tests defined by wait.h

Adds the various process test macros specified in the wait(2) manpage on OS X. ```WCOREDUMP``` is implemented BSD-wide as it seems to be the only macro whose definition is constant across the BSDs.
@bors
Copy link
Contributor

bors commented Apr 30, 2016

☀️ Test successful - status-appveyor, travis

@bors bors merged commit 06abf3a into rust-lang:master Apr 30, 2016
Susurrus pushed a commit to Susurrus/libc that referenced this pull request Mar 26, 2017
mqueue: change types to allow more cases

Part of nix-rust/nix#270, fixed according to @kamalmarhubi's comments.
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.

4 participants