-
Notifications
You must be signed in to change notification settings - Fork 682
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
Change getrlimit and setrlimit to use rlim_t directly. #1668
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.
LGTM. @rtzoeller do you have any thoughts on this one?
@Arnavion can you add back a reference to We can paraphrase from this part of the documentation:
Otherwise the changes look good to me. |
Done. |
src/sys/resource.rs
Outdated
/// > Note: for some os (linux_gnu), setting hard_limit to `RLIM_INFINITY` can | ||
/// > results `EPERM` Error. So you will need to set the number explicitly. | ||
/// The special value `RLIM_INFINITY` indicates that no limit will be | ||
/// enforced. For some OSes (linux_gnu), setting the hard limit to |
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 don't think that Linux returns EPERM because the user tried to set RLIM_INFINITY specifically. Rather, I think that happens because the user tries to raise the limit. That's disallowed on every OS.
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.
Yes, I wasn't sure why the comment was initially worded the way it was. I can fix it.
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.
Actually, is there a point in fixing it? It would just be duplicating the spec, that's already linked as a reference. Should I just delete that sentence?
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.
@asomers Ping.
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.
Removing it should be ok, but we shouldn't leave the wrong explanation in place.
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.
Done.
CHANGELOG.md
Outdated
@@ -54,6 +54,9 @@ This project adheres to [Semantic Versioning](https://semver.org/). | |||
(#[1665](/~https://github.com/nix-rust/nix/pull/1665)) | |||
- Implemented `Read` and `Write` for `&PtyMaster` | |||
(#[1664](/~https://github.com/nix-rust/nix/pull/1664)) | |||
- Changed `getrlimit` and `setrlimit` to use `rlim_t` directly |
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.
This should go in the "Changed" section, rather than "Added".
If you squash and rebase, this LGTM.
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.
Done.
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.
bors r+
Build failed: |
bors retry |
Fixes #1666