execute: when we can't get the requested rlimit, get the next closest

This commit is contained in:
Lennart Poettering
2012-04-12 12:58:19 +02:00
parent d18f337c3f
commit 68faf98ca0
3 changed files with 28 additions and 1 deletions
+1 -1
View File
@@ -1367,7 +1367,7 @@ int exec_spawn(ExecCommand *command,
if (!context->rlimit[i])
continue;
if (setrlimit(i, context->rlimit[i]) < 0) {
if (setrlimit_closest(i, context->rlimit[i]) < 0) {
err = -errno;
r = EXIT_LIMITS;
goto fail_child;