-
Notifications
You must be signed in to change notification settings - Fork 557
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 the rlimit type to string instead of int #159
Conversation
should we set some const for these? ( |
@vbatts I think for this case, we could let the runtime map from string to the constants just like for capabilities. That way we don't have to track changes as newer constants are added. |
@@ -155,7 +155,7 @@ For more information, see [the man page](http://man7.org/linux/man-pages/man8/sy | |||
] | |||
``` | |||
|
|||
rlimits allow setting resource limits. The type is from the values defined in [the man page](http://man7.org/linux/man-pages/man2/setrlimit.2.html). The kernel enforces the soft limit for a resource while the hard limit acts as a ceiling for that value that could be set by an unprivileged process. | |||
rlimits allow setting resource limits. `type` is a string with a value from those defined in [the man page](http://man7.org/linux/man-pages/man2/setrlimit.2.html). The kernel enforces the `soft` limit for a resource while the `hard` limit acts as a ceiling for that value that could be set by an unprivileged process. |
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.
Touching this line is probably a good enough excuse to reformat with one line per-sentence.
@wking but that is less clear? |
On Tue, Sep 08, 2015 at 01:42:00PM -0700, Vincent Batts wrote:
Why is it less clear? The context (linux.rlimits) should be enough to |
Those dropped-prefixes are idioms elected for those projects internal
|
On Tue, Sep 08, 2015 at 02:20:01PM -0700, Vincent Batts wrote:
That's not just because C doesn't namespace definitions? Since we get |
Context is something to be aware of. Honestly, I'm not sure whether you're On Tue, Sep 8, 2015 at 5:31 PM, W. Trevor King [email protected]
|
On Tue, Sep 08, 2015 at 03:39:11PM -0700, Vincent Batts wrote:
I think it's unlikely that the prefix will change ;). But there's no |
One could argue both ways but I think it is better to be explicit here. Also, some tooling could benefit by directly using these definitions from their header files. |
On Tue, Sep 08, 2015 at 04:03:58PM -0700, Mrunal Patel wrote:
This seems fair.
Adding the prefix back in before searching headers seems easy enough, But “the redunancy reduction from removing the namespacing prefix is |
On Tue, Sep 08, 2015 at 03:39:11PM -0700, Vincent Batts wrote:
And I think everyone who's chimed in is on board with prefixed strings |
Seems fine, needs a rebase. |
Signed-off-by: Mrunal Patel <[email protected]>
Rebased. |
lgtm |
LGTM |
Change the rlimit type to string instead of int
Signed-off-by: Mrunal Patel [email protected]