mirror of
https://github.com/systemd/systemd
synced 2024-09-15 22:30:22 +00:00
journald: after the cgroup rework processes may be in both user and system units at the same time
This commit is contained in:
parent
83787333bd
commit
19cace379f
|
@ -623,19 +623,20 @@ static void dispatch_message_real(
|
|||
if (cg_path_get_unit(c, &t) >= 0) {
|
||||
x = strappenda("_SYSTEMD_UNIT=", t);
|
||||
free(t);
|
||||
} else if (cg_path_get_user_unit(c, &t) >= 0) {
|
||||
IOVEC_SET_STRING(iovec[n++], x);
|
||||
} else if (unit_id && !session) {
|
||||
x = strappenda("_SYSTEMD_UNIT=", unit_id);
|
||||
IOVEC_SET_STRING(iovec[n++], x);
|
||||
}
|
||||
|
||||
if (cg_path_get_user_unit(c, &t) >= 0) {
|
||||
x = strappenda("_SYSTEMD_USER_UNIT=", t);
|
||||
free(t);
|
||||
} else if (unit_id) {
|
||||
if (session)
|
||||
x = strappenda("_SYSTEMD_USER_UNIT=", unit_id);
|
||||
else
|
||||
x = strappenda("_SYSTEMD_UNIT=", unit_id);
|
||||
} else
|
||||
x = NULL;
|
||||
|
||||
if (x)
|
||||
IOVEC_SET_STRING(iovec[n++], x);
|
||||
} else if (unit_id && session) {
|
||||
x = strappenda("_SYSTEMD_USER_UNIT=", unit_id);
|
||||
IOVEC_SET_STRING(iovec[n++], x);
|
||||
}
|
||||
|
||||
free(c);
|
||||
}
|
||||
|
@ -728,14 +729,14 @@ static void dispatch_message_real(
|
|||
if (cg_path_get_unit(c, &t) >= 0) {
|
||||
x = strappenda("OBJECT_SYSTEMD_UNIT=", t);
|
||||
free(t);
|
||||
} else if (cg_path_get_user_unit(c, &t) >= 0) {
|
||||
IOVEC_SET_STRING(iovec[n++], x);
|
||||
}
|
||||
|
||||
if (cg_path_get_user_unit(c, &t) >= 0) {
|
||||
x = strappenda("OBJECT_SYSTEMD_USER_UNIT=", t);
|
||||
free(t);
|
||||
} else
|
||||
x = NULL;
|
||||
|
||||
if (x)
|
||||
IOVEC_SET_STRING(iovec[n++], x);
|
||||
}
|
||||
|
||||
free(c);
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ typedef struct Server {
|
|||
bool sync_scheduled;
|
||||
} Server;
|
||||
|
||||
#define N_IOVEC_META_FIELDS 17
|
||||
#define N_IOVEC_META_FIELDS 19
|
||||
#define N_IOVEC_KERNEL_FIELDS 64
|
||||
#define N_IOVEC_UDEV_FIELDS 32
|
||||
#define N_IOVEC_OBJECT_FIELDS 11
|
||||
|
|
Loading…
Reference in a new issue