[PATCH] do not call _dbus_warn_check_failed on checks
hp at redhat.com
Tue Nov 14 07:15:00 PST 2006
Daniel Stone wrote:
> On Tue, Nov 14, 2006 at 10:48:32AM +0100, Thiago Macieira wrote:
>> I don't think it's reasonable to expect that all applications will support
>> For one thing, the default behaviour of libdbus-1 is to call exit(3) if
>> the connection disconnects. So, the reasonable thing is to expect
>> applications to exit if the bus restarts.
> Given this insane constraint (very, very, very Xlib-like)
It's not a "constraint" it's a default. If you don't want to exit, then
Exiting is the right default since apps have to have special handling to
deal with a disconnect, and if you code that you can disable the exit,
if you don't code it then exit is as good a default as any. Exiting is
also correct for most apps on the session bus, since a disconnect from
the session bus means the session is closing.
>, then no, it's
> not reasonable, because of absolutely ridiculous library behaviour.
(as defined by you when you obviously haven't read either the code or
the docs in any detail)
> It's difficult, and you can never get it absolutely, perfectly,
> bullet-proof, 100% bug-free. But you can optimise for the common case
> and get it right 99.9% of the time. And when the planets align and
> conspire against you to cause one tiny minor failure in an extreme
> corner case, then it's still better than exit(3), which works for
> exactly 0.0% of the cases.
If you're right and 99.9% of apps are handling disconnect, then 99.9% of
apps will have called set_exit_on_disconnect(FALSE) also.
More information about the dbus