URL:
https://github.com/SSSD/sssd/pull/967
Author: mzidek-rh
Title: #967: util/watchdog: fixed watchdog implementation
Action: opened
PR body:
"""
In case watchdog detected locked process and this process was parent
process it just sent SIGTERM to the whole group of processes, including
itself.
This handling was wrong: generic `server_setup()` installs custom
libtevent handler for SIGTERM signal so this signal is only processed
in the context of tevent mainloop. But if tevent mainloop is stuck
(exactly the case that triggers WD) then event is not processed
and this made watchdog useless.
`watchdog_handler()` and `watchdog_detect_timeshift()` were amended to do
unconditional `_exit()` after optionally sending a signal to the group.
Resolves:
https://pagure.io/SSSD/sssd/issue/4089
Reviewed-by: Sumit Bose <sbose(a)redhat.com>
(cherry picked from commit 2c13d8bd00f1e8ff30e9fc81f183f6450303ac30)
"""
To pull the PR as Git branch:
git remote add ghsssd
https://github.com/SSSD/sssd
git fetch ghsssd pull/967/head:pr967
git checkout pr967