FedeDP / Clightd

A linux bus interface that lets you change screen brightness, compute captured webcam frames brightness and change screen temperature.
GNU General Public License v3.0
83 stars 10 forks source link

Tie lifetime of clightd daemon to existence of dbus system bus #38

Closed ahesford closed 4 years ago

ahesford commented 4 years ago

Currently, clightd fails to start if dbus is not already running, as clightd cannot find the necessary dbus system bus. If dbus is running prior to launching clightd, clightd will launch as expected. However, if dbus is killed while clightd is running and attached to the bus, clightd will not die, but will instead repeatedly print error messages about an inability to connect to the bus.

It would be better if clightd died when it loses its connection to the dbus system bus. This allows service management to do the right thing when starting or restarting dbus, because clightd will terminate and the service manager can restart it. Otherwise, killing or restarting dbus while clightd is running will cause clightd to become inoperable, but the system service manager will not do the right thing and restart the daemon.

FedeDP commented 4 years ago

This is a nice and very simple to implement idea; it will surely get into next Clightd release. Thank you for taking the time to open this issue!

FedeDP commented 4 years ago

Fixed by commit 14d0bded9d14921939f4dd40e857c292010aba10 on devel branch! Again, thanks for your input. This will be available in next release.