2c13d8b util/watchdog: fixed watchdog implementation

1 file Authored by atikhonov 4 years ago, Committed by mzidek 4 years ago,
    util/watchdog: fixed watchdog implementation
    
    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@redhat.com>
    
        
file modified
+2 -4