-
Notifications
You must be signed in to change notification settings - Fork 676
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
Add ppoll() #520
Add ppoll() #520
Conversation
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.
couple of small changes, otherwise this looks great!
src/poll.rs
Outdated
@@ -47,3 +50,19 @@ pub fn poll(fds: &mut [PollFd], timeout: libc::c_int) -> Result<libc::c_int> { | |||
|
|||
Errno::result(res) | |||
} | |||
|
|||
pub fn ppoll(fds: &mut [PollFd], timeout: Duration) -> Result<libc::c_int> { |
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.
can you take timeout: TimeSpec
until we decide how to resolve #516?
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.
we should accept a sigmask here, too. @fiveop @chaosagent could you suggest how to represent it in nix?
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.
we should accept a sigmask here, too. @fiveop @chaosagent could you suggest how to represent it in nix?
I wasn't sure if you wanted me to tack on additional commits to fix this or not, so I force-pushed a new version addressing both the sigmask issue (as I thought it could currently be solved) and using |
I've pushed a rebased version to re-trigger Travis now that |
@homu r+ |
📌 Commit cce4dec has been approved by |
Add ppoll() This will currently fail CI, as the necessary changes haven't hit libc yet. That is tracked in rust-lang/libc#537. This does build on my computer using the changes tracked on that PR, so I'd appreciate any visual review of this code as it should be "done". I also wanted to get this submitted so hopefully it'd be in the queue for the 0.8 release.
💔 Test failed - status |
I'm not certain what's going on with travis and tempfile, which seems to be causing errors, but I'll make sure to only expose this function to non-Mac OSes:
|
So Anyways, this should resolve failures on Mac. I still don't know what's up with the other failing platforms, but they're |
Looks like you didn't add your |
@kamalmarhubi Whoops, don't know what happened there! Anyways, I've added the |
thanks! @homu r+ |
📌 Commit c96d818 has been approved by |
Add ppoll() This will currently fail CI, as the necessary changes haven't hit libc yet. That is tracked in rust-lang/libc#537. This does build on my computer using the changes tracked on that PR, so I'd appreciate any visual review of this code as it should be "done". I also wanted to get this submitted so hopefully it'd be in the queue for the 0.8 release.
💔 Test failed - status |
@@ -1,3 +1,6 @@ | |||
use sys::time::TimeSpec; |
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.
You have to conditional include this and SigSet
. This is why the build fails on macos.
Alright, I think I got it this time! Note that all the Rust 1.7.0 errors are still occuring but we can't tell if they're a result of this change because they're all failing on the |
All targets pass on Travis. This look good to merge? |
@kamalmarhubi must still accept the changes. I think his concerns are addressed, but I do not want to press the link 'Dismiss review'. |
@homu r+ |
📌 Commit 5d4967e has been approved by |
Add ppoll() This will currently fail CI, as the necessary changes haven't hit libc yet. That is tracked in rust-lang/libc#537. This does build on my computer using the changes tracked on that PR, so I'd appreciate any visual review of this code as it should be "done". I also wanted to get this submitted so hopefully it'd be in the queue for the 0.8 release.
☀️ Test successful - status |
This will currently fail CI, as the necessary changes haven't hit libc yet. That is tracked in rust-lang/libc#537. This does build on my computer using the changes tracked on that PR, so I'd appreciate any visual review of this code as it should be "done".
I also wanted to get this submitted so hopefully it'd be in the queue for the 0.8 release.