mirror of
https://github.com/systemd/systemd.git
synced 2025-08-03 08:22:21 +03:00
systemctl: emit warning when we get an invalid process entry from pid1 and continue
Output looks like this: Invalid process description in GetUnitProcesses reply: cgroup="machine.slice/machine-rawhide.scope/payload/system.slice/systemd-journald.service" pid=638367 command="/usr/lib/systemd/systemd-journald", ignoring: Invalid argument
This commit is contained in:
@ -387,8 +387,11 @@ int unit_show_processes(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
r = add_process(cgroups, path, pid, name);
|
r = add_process(cgroups, path, pid, name);
|
||||||
if (r < 0)
|
if (r == -ENOMEM)
|
||||||
goto finish;
|
goto finish;
|
||||||
|
if (r < 0)
|
||||||
|
log_warning_errno(r, "Invalid process description in GetUnitProcesses reply: cgroup=\"%s\" pid="PID_FMT" command=\"%s\", ignoring: %m",
|
||||||
|
path, pid, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
r = sd_bus_message_exit_container(reply);
|
r = sd_bus_message_exit_container(reply);
|
||||||
|
@ -4548,7 +4548,8 @@ static void print_status_info(
|
|||||||
|
|
||||||
show_cgroup_and_extra(SYSTEMD_CGROUP_CONTROLLER, i->control_group, prefix, c, extra, k, get_output_flags());
|
show_cgroup_and_extra(SYSTEMD_CGROUP_CONTROLLER, i->control_group, prefix, c, extra, k, get_output_flags());
|
||||||
} else if (r < 0)
|
} else if (r < 0)
|
||||||
log_warning_errno(r, "Failed to dump process list for '%s', ignoring: %s", i->id, bus_error_message(&error, r));
|
log_warning_errno(r, "Failed to dump process list for '%s', ignoring: %s",
|
||||||
|
i->id, bus_error_message(&error, r));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i->id && arg_transport == BUS_TRANSPORT_LOCAL)
|
if (i->id && arg_transport == BUS_TRANSPORT_LOCAL)
|
||||||
|
Reference in New Issue
Block a user