Skip to content
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

Merged
merged 2 commits into from
Jan 8, 2020

Conversation

poettering
Copy link
Member

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

xnox and others added 2 commits January 2, 2020 20:50
@poettering
Copy link
Member Author

Hmm, CI failure looks like a segfault in valgrind. Which appears unrelated? weird...

@mrc0mmand
Copy link
Member

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

@poettering
Copy link
Member Author

@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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here

@keszybz keszybz merged commit 06ae880 into systemd:master Jan 8, 2020
poettering added a commit to poettering/systemd that referenced this pull request Jan 8, 2020
@poettering poettering mentioned this pull request Jan 8, 2020
poettering added a commit to poettering/systemd that referenced this pull request Jan 8, 2020
mrc0mmand pushed a commit that referenced this pull request Jan 8, 2020
Yamakuzure pushed a commit to elogind/elogind that referenced this pull request Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants