75ba524 Util: Add watchdog helper

3 files Authored by simo 7 years ago, Committed by jhrozek 7 years ago,
    Util: Add watchdog helper
    
    The watchdog uses a kernel timer to issue a signal to the process.
    It checks if the ticker is not being reset by the main event loop, which
    would indicate that the process got stuck.
    At the same time it sets a tevent timer to clear the watchdog ticker, so
    that the watchdog handler is kept happy.
    
    If the watchdog detects that the timer event failed to reset the watchdog for
    three times in a row then the process is killed.
    Normally the monitor will detect the child terminated and will rescheduled it.
    
    Related:
    https://fedorahosted.org/sssd/ticket/2921
    
    Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
    Reviewed-by: Pavel Březina <pbrezina@redhat.com>
    
        
file modified
+1 -0
file modified
+4 -0