【发布时间】:2015-12-22 20:36:59
【问题描述】:
当使用的 dbus 服务退出/崩溃/重新启动时,dbus 用户如何获得通知?
本教程建议有一种方法可以做到这一点,但在规范中我只找到了一个用于名称所有者的信号。
dbus tutorial 说:
Names have a second important use, other than routing messages. They are used to track lifecycle. When an application exits (or crashes), its connection to the message bus will be closed by the operating system kernel. The message bus then sends out notification messages telling remaining applications that the application's names have lost their owner. By tracking these notifications, your application can reliably monitor the lifetime of other applications.
dbus specification 有一个关于 NameLost 信号的部分:
org.freedesktop.DBus.NameLost
This signal is sent to a specific application when it loses ownership of a name.
【问题讨论】:
标签: dbus