X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fexecute.c;h=1ab321851792f8d772dd4176f38d4cfccb9948e9;hb=e27796a03065fac50fad07d5b42682ecb1e17d46;hp=c73b0c6c04866704d3af9f750ea5143669daebfa;hpb=ff01d048b4c1455241c894cf7982662c9d28fd34;p=elogind.git diff --git a/src/execute.c b/src/execute.c index c73b0c6c0..1ab321851 100644 --- a/src/execute.c +++ b/src/execute.c @@ -930,6 +930,7 @@ int exec_spawn(ExecCommand *command, bool apply_tty_stdin, bool confirm_spawn, CGroupBonding *cgroup_bondings, + CGroupAttribute *cgroup_attributes, pid_t *ret) { pid_t pid; @@ -973,9 +974,11 @@ int exec_spawn(ExecCommand *command, log_debug("About to execute: %s", line); free(line); - if (cgroup_bondings) - if ((r = cgroup_bonding_realize_list(cgroup_bondings))) - goto fail_parent; + r = cgroup_bonding_realize_list(cgroup_bondings); + if (r < 0) + goto fail_parent; + + cgroup_attribute_apply_list(cgroup_attributes, cgroup_bondings); if ((pid = fork()) < 0) { r = -errno;