manager: add socket for receiving handoff timestamps from forked children

This adds an AF_UNIX socket pair to the manager that we can collect
handoff timestamp messages on.

The idea is that forked off children send a datagram with a timestamp
and we use its sender PID to match it against the right forked off
process.

This part only implements the receiving side: a socket is created, and
listened on. Received datagrams are parsed, verified and then dispatched
to the interested units.
This commit is contained in:
Lennart Poettering
2024-04-25 13:33:03 +02:00
parent 33fc8b0d95
commit 817062e621
4 changed files with 151 additions and 17 deletions
+6
View File
@@ -148,6 +148,12 @@ int manager_serialize(
return r;
}
if (m->handoff_timestamp_fds[0] >= 0) {
r = serialize_fd_many(f, fds, "handoff-timestamp-fds", m->handoff_timestamp_fds, 2);
if (r < 0)
return r;
}
(void) serialize_ratelimit(f, "dump-ratelimit", &m->dump_ratelimit);
(void) serialize_ratelimit(f, "reload-reexec-ratelimit", &m->reload_reexec_ratelimit);