-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Added the waitid interface #418
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
Conversation
…n individual threads, thread groups, or every thread on the system.
(rust_highfive has picked a reviewer for you, use r? to override) |
Invalid pointer type attempting fix. |
P_ALL, | ||
P_PID, | ||
P_PGID | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now we actually tend to avoid literal enum
types as they're not extensible (while the C side is), so perhaps these could just be pub const P_ALL: c_int = i32
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should work. I wasn't sure which was more idiomatic. Should I go thought the whole song of dance of pub type id_t = c_int; pub const P_ALL: ::id_t = i32;
?
Oh nevermind id_t is defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah let's take the route of listing all the constants explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I lifted the the constant definition to linux/mod.rs
from /linux/other/mod.rs
because sys/wait.h
should be standard cross all GNU/Linux platforms.
The type+explicitly declared constants is added. Waiting for Travis-ci to report.
…across all *GNU* platforms. So I think putting at this high of level is okay, but if that is true I should lift waitid up to apply to all the various linux flavors
pub enum fpos64_t {} // TODO: fill this out with a struct | ||
|
||
pub const P_PID: ::id_t = 1; | ||
pub const P_PGID: ::id_t = 2; | ||
pub const P_ALL: ::id_t = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be idtype_t
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update.
Also while I have your attention. How does one go about adding the linux/*.h
sources for linking?
I can see where to add them for the test suite/crate. This was the main issue why I couldn't merge the 2 remaining for PTRACE
yesterday/last night.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately those headers are a little difficult include, but if the uapi business works then I think it'd be relatively easy to add!
Looks like CI may still be failing? |
Style error I'll submit a commit in the morning got distracted today On Saturday, October 8, 2016, Alex Crichton [email protected]
|
I'm not sure how to explain this failing. On a lot of platforms the are running tests for |
It looks like there's failures across various platforms, for examples mips-musl has |
Expand on release procedure
Waitid allows for a non-blocking way to check the status of individual threads, groups of threads, or every thread on the system.
Not 100% sure about how the linking is handled. Also can't confirm that it exists for every platform currently. I'm more or less gonna use travis for that.