1
0
mirror of https://github.com/systemd/systemd synced 2024-07-01 07:34:28 +00:00

machined: use pidref instead of just pid when determining unit of pid when registering machine

This commit is contained in:
Lennart Poettering 2024-05-27 12:03:35 +02:00
parent 92a6f21484
commit 0870654241

View File

@ -390,7 +390,7 @@ static int method_register_machine_internal(sd_bus_message *message, bool read_n
if (r < 0)
return r;
r = cg_pid_get_unit(m->leader.pid, &m->unit);
r = cg_pidref_get_unit(&m->leader, &m->unit);
if (r < 0) {
r = sd_bus_error_set_errnof(error, r,
"Failed to determine unit of process "PID_FMT" : %m",