aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-08-01 11:02:30 +0200
committerLennart Poettering <lennart@poettering.net>2017-08-10 15:02:50 +0200
commitf0d477979e0d759c4160df010ec9c44863c7032a (patch)
tree3791e3cb48241d79716cabb60c1f0424e8d5024e /src/core/swap.c
parentcore: manager_set_exec_params() cannot fail, hence make it void (diff)
downloadsystemd-f0d477979e0d759c4160df010ec9c44863c7032a.tar.gz
systemd-f0d477979e0d759c4160df010ec9c44863c7032a.tar.bz2
systemd-f0d477979e0d759c4160df010ec9c44863c7032a.zip
core: introduce unit_set_exec_params()
The new unit_set_exec_params() call is to units what manager_set_exec_params() is to the manager object: it initializes the various fields from the relevant generic properties set.
Diffstat (limited to 'src/core/swap.c')
-rw-r--r--src/core/swap.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/swap.c b/src/core/swap.c
index 255076839..86995a45d 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -637,9 +637,7 @@ static int swap_spawn(Swap *s, ExecCommand *c, pid_t *_pid) {
goto fail;
manager_set_exec_params(UNIT(s)->manager, &exec_params);
-
- exec_params.cgroup_path = UNIT(s)->cgroup_path;
- SET_FLAG(exec_params.flags, EXEC_CGROUP_DELEGATE, s->cgroup_context.delegate);
+ unit_set_exec_params(UNIT(s), &exec_params);
r = exec_spawn(UNIT(s),
c,