When the D-Bus daemon terminates, the local D-Bus library sends a <i>Disconnected</i> signal to the application. The application can listen for this signal like any other D-Bus signal and appropriate actions can be taken.

No filter is necessary to receive this signal.

For example, to terminate the application with an exit code of 99 when the D-Bus disappears:<verbatim>
dbus listen [dbus info local] Disconnected {apply {args {exit 99}}}
</verbatim>