[systemd-devel] [PATCH] Delay dbus connection for user session

Lennart Poettering lennart at poettering.net
Tue Jun 4 10:31:30 PDT 2013


On Wed, 29.05.13 08:59, Yang Chengwei (chengwei.yang at intel.com) wrote:

> > > diff --git a/src/core/manager.c b/src/core/manager.c
> > > index 0508628..467b5ba 100644
> > > --- a/src/core/manager.c
> > > +++ b/src/core/manager.c
> > > @@ -503,7 +503,7 @@ int manager_new(SystemdRunningAs running_as, Manager **_m) {
> > >                  goto fail;
> > >
> > >          /* Try to connect to the busses, if possible. */
> > > -        r = bus_init(m, running_as != SYSTEMD_SYSTEM);
> > > +        r = bus_init(m, running_as != SYSTEMD_SYSTEM && running_as != SYSTEMD_USER);
> > >          if (r < 0)
> > >                  goto fail;
> > 
> > So, I've looked at this code again as I've spotted this problem over a
> > year ago, and I'm wondering if this entire section should just be
> > removed, since running_as only has 2 values (_SYSTEM and _USER)
> > anyway...
> > 
> > Would there be any objection to just dropping these 4 lines entirely?
> > Lennart, Kay? I don't see how we'd have a 3rd manager type here.
> 
> Yes, just in that case. If all of you agreed, I'd like submit a V2 to
> drop these lines.

Hmm, this would break my usual testing routine, where i run user systemd
against a bus daemon that is already running... I have no doubt that
dropping the check entirely is the right way to go eventually, but maybe
we can find a better way so that this continues to work for me until
GNOME has switched over to systemd as service manager.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list