intel / thermal_daemon

Thermal daemon for IA
GNU General Public License v2.0
540 stars 117 forks source link

main: Handle signals from mainloop #362

Closed benzea closed 2 years ago

benzea commented 2 years ago

The signal handler ends up calling quite a lot of code, not all of this code is signal safe. Fix the issue by instead using the GLib infrastructure to execute the code from the mainloop instead.

Note that there are probably more cleanups to be had here. But this is sufficient to fix the signal safety.

Fixes: #361