core: add basic infrastructure to record unit activation information

Not wired in by any unit type yet, just the basic to allocate,
ref, deref and plug in to other unit types.
Includes recording the trigger unit name and passing it to the
triggered unit as TRIGGER_UNIT= env var.
This commit is contained in:
Luca Boccassi
2022-08-23 20:38:08 +01:00
parent f52faaf923
commit 48b92b37ac
16 changed files with 348 additions and 20 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ static int test_socket_bind(
SERVICE(u)->type = SERVICE_ONESHOT;
u->load_state = UNIT_LOADED;
r = unit_start(u);
r = unit_start(u, NULL);
if (r < 0)
return log_error_errno(r, "Unit start failed %m");