tuned
tuned copied to clipboard
daemon: buffer sighup signal
Resolves: RHEL-31180
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.
It would be generally better and much cleaner to do the reloads in the main loop, but it would require bigger code changes.
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.