URL:
https://github.com/SSSD/sssd/pull/107
Title: #107: WATCHDOG: Avoid non async-signal-safe from the signal_handler
fidencio commented:
"""
Argh, and also:
```
diff --git a/src/util/util_watchdog.c b/src/util/util_watchdog.c
index 17954d1..77ba705 100644
--- a/src/util/util_watchdog.c
+++ b/src/util/util_watchdog.c
@@ -50,7 +50,7 @@ static bool watchdog_detect_timeshift(void)
if (cur_time < prev_time) {
/* Time shift detected. We need to restart watchdog. */
if (write(watchdog_ctx.pipefd[1], "1", 1) != 1) {
- _exit(1);
+ kill(-getpgrp(), SIGTERM);
}
return true;
```
"""
See the full comment at
https://github.com/SSSD/sssd/pull/107#issuecomment-270128553