summaryrefslogtreecommitdiffstats
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-11-24 22:02:22 +0100
committerLennart Poettering <lennart@poettering.net>2017-11-25 17:08:21 +0100
commita4634b214c59631763b2c8dbd012eb3dca8ac91a (patch)
tree625326d47838a5d003917671bbeedaa00234d153 /src/core/mount.c
parentcore: generalize the cgroup empty check on GC (diff)
downloadsystemd-a4634b214c59631763b2c8dbd012eb3dca8ac91a.tar.xz
systemd-a4634b214c59631763b2c8dbd012eb3dca8ac91a.zip
core: warn about left-over processes in cgroup on unit start
Now that we don't kill control processes anymore, let's at least warn about any processes left-over in the unit cgroup at the moment of starting the unit.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 1500670b09..b25bb9cb40 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -938,9 +938,6 @@ static void mount_enter_mounting(Mount *m) {
assert(m);
- m->control_command_id = MOUNT_EXEC_MOUNT;
- m->control_command = m->exec_command + MOUNT_EXEC_MOUNT;
-
r = unit_fail_if_symlink(UNIT(m), m->where);
if (r < 0)
goto fail;
@@ -949,6 +946,11 @@ static void mount_enter_mounting(Mount *m) {
unit_warn_if_dir_nonempty(UNIT(m), m->where);
+ unit_warn_leftover_processes(UNIT(m));
+
+ m->control_command_id = MOUNT_EXEC_MOUNT;
+ m->control_command = m->exec_command + MOUNT_EXEC_MOUNT;
+
/* Create the source directory for bind-mounts if needed */
p = get_mount_parameters_fragment(m);
if (p && mount_is_bind(p))