[systemd-devel] [PATCH] bus-control: Fix cgroup handling

Lennart Poettering lennart at poettering.net
Mon Aug 18 05:33:31 PDT 2014

On Sat, 16.08.14 13:55, Denis Kenzior (denkenz at gmail.com) wrote:

> On systems without properly setup systemd, cg_get_root_path returns
> -ENOENT.  This means that busctl doesn't display much information.
> busctl monitor also fails whenever it intercepts messages.
> This fix fakes creates a fake "/" root cgroup which lets busctl work
> on such systems.

Sounds generally OK, but now that this is logic is more thant just one
"if" check plus a function call, and given that we need this twice,
could we move this to its own utility function in sd-bus or so?  Create
a new bus_get_root_path() or so, which fills in the cgroup_root if it is
missing, and do nothing if we already know it?

Also, there's an OOM check missing after the strdup().


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list