assert(sig >= 0);
+ /* Don't send SIGCONT twice. Also, SIGKILL always works even when process is suspended, hence don't send
+ * SIGCONT on SIGKILL. */
+ if (IN_SET(sig, SIGCONT, SIGKILL))
+ flags &= ~CGROUP_SIGCONT;
+
/* This goes through the tasks list and kills them all. This
* is repeated until no further processes are added to the
* tasks list, to properly handle forking processes */
log_debug_elogind("Migrating \"%s\"/\"%s\" to \"%s\"/\"%s\" (%s)",
cfrom, pfrom, cto, pto,
- ignore_self ? "ignoring self" : "watching self");
+ (flags & CGROUP_IGNORE_SELF)
+ ? "ignoring self" : "watching self");
do {
_cleanup_fclose_ FILE *f = NULL;
pid_t pid = 0;
return write_string_file(p, value, 0);
}
-#if 0 /// UNNEEDED by elogind
int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) {
_cleanup_free_ char *p = NULL;
int r;
return read_one_line_file(p, ret);
}
+#if 0 /// UNNEEDED by elogind
int cg_create_everywhere(CGroupMask supported, CGroupMask mask, const char *path) {
CGroupController c;
int r, unified;