Re: [patch] make NM survive D-BUS system bus restarts

On Fri, 2006-02-17 at 17:52 +0100, Timo Hoenig wrote:
> Hi,
> Currently NetworkManager does not recover once the D-BUS system bus is
> restarted.  With the attached patch it will survive such a exceptional
> conditions.
> It does the following:
>       * add function nm_dbus_reinit to src/NetworkManagerDbus.c.
>       * fix: handle the signal "Disconnected" on DBUS_INTERFACE_LOCAL
>         rather than DBUS_INTERFACE_DBUS
>       * create thread nm_dbus_reinit once we receive this signal.  Retry
>         every three seconds until we have a new connection to the system
>         bus.
>       * call dbus_connection_set_exit_on_disconnect (connection, FALSE)
>         in order not to get shutdown by libdbus.
> Using g_timeout_add rather than a GThread did not work out.

Discussion here is required...  haven't we gone over this before?

DBUS shouldn't ever be restarted from underneath NetworkManager.  DBUS
shouldn't be restarted when it is updated, unless you restart your
system.  If the bus dies, that's a bug.

There have been quite a few discussions about this sort of thing, and
the general conclusion has been "don't do that"...

I'm curious what prompted this patch?  Just because we can do it doesn't
necessarily mean we should.


PS - I'm not 100% against it, but wanted to figure this out in the
context of previous DBUS restart discussions on other lists, like HAL
for example.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]