Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
journald: correctly attribute log messages also with cgroupsv1
With cgroupsv1 a zombie process is migrated to root cgroup in all hierarchies. This was changed for unified hierarchy and /proc/PID/cgroup reports cgroup to which process belonged before it exited. Be more suspicious about cgroup path reported by the kernel and use unit_id provided by the log client if the kernel reports that process is running in the root cgroup. Users tend to care the most about 'log->unit_id' mapping so systemctl status can correctly report last log lines. Also we wouldn't be able to infer anything useful from "/" path anyway. See: torvalds/linux@2e91fa7
- Loading branch information