-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
When Nice= is used, clamp to RLIMIT_NICE #14465
Conversation
Instead, push to the closest possible Nice priority setting. Replaces: systemd#11397
ab99d40
to
75997c3
Compare
Hmm, CI failure looks like a segfault in valgrind. Which appears unrelated? weird... |
Yup, this is unfortunately a flake... I'll give it one more try |
@mrc0mmand nice! it passed this time! thanks! |
|
||
/* rlimit of 30 equals nice level of -10 */ | ||
if (setrlimit(RLIMIT_NICE, &RLIMIT_MAKE_CONST(30)) < 0) { | ||
/* If this fails we are probably unprivielged or in a userns of some kind, let's skip |
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.
typo here
As pointed out on: systemd#14465 (comment)
As pointed out on: systemd#14465 (comment)
As pointed out on: #14465 (comment)
As pointed out on: systemd/systemd#14465 (comment)
This is a warm-up for #11397 which was too close to being ready to leave it hanging. I did some minor updates (mostly what I pointed out in my most recent review on that PR), plus added a test case.
Since this is mostly @xnox i left his authorship of the commit intact.
/cc @xnox