tuned icon indicating copy to clipboard operation
tuned copied to clipboard

daemon: buffer sighup signal

Open yarda opened this issue 1 year ago • 3 comments

Resolves: RHEL-31180

yarda avatar Apr 04 '24 16:04 yarda

There is no need for atomic test & set or semaphores, because the signal handler is running in one thread thus the worst thing that could happen is that the SIGHUP on the edge of the time interval will be ignored. Nevertheless, the buffer should improve the responsiveness to the SIGHUP.

yarda avatar Apr 04 '24 16:04 yarda

It would be generally better and much cleaner to do the reloads in the main loop, but it would require bigger code changes.

yarda avatar Apr 04 '24 16:04 yarda

Thank you for a quick fix, @yarda ! LGTM I've also tested this and I haven't seen TuneD stuck after it was sent a SIGHUP after cca 800 iterations of our e2e test suite.

jmencak avatar Apr 05 '24 09:04 jmencak