core/execute: warn when threaded mode is detected

Prompted by #22486.
This commit is contained in:
Yu Watanabe
2022-02-16 15:59:03 +09:00
parent 084e7706c2
commit 702cf08fce
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -4250,6 +4250,12 @@ static int exec_child(
}
r = cg_attach_everywhere(params->cgroup_supported, p, 0, NULL, NULL);
if (r == -EUCLEAN) {
*exit_status = EXIT_CGROUP;
return log_unit_error_errno(unit, r, "Failed to attach process to cgroup %s "
"because the cgroup or one of its parents or "
"siblings is in the threaded mode: %m", p);
}
if (r < 0) {
*exit_status = EXIT_CGROUP;
return log_unit_error_errno(unit, r, "Failed to attach to cgroup %s: %m", p);