URL: https://github.com/SSSD/sssd/pull/107
Title: #107: WATCHDOG: Avoid non async-signal-safe from the signal_handler

fidencio commented:
"""
Here is the diff between the older version and the one about to be pushed:
```
[ffidenci@cat sssd]$ git diff
diff --git a/src/util/util_watchdog.c b/src/util/util_watchdog.c
index b4889a1..17954d1 100644
--- a/src/util/util_watchdog.c
+++ b/src/util/util_watchdog.c
@@ -75,7 +75,7 @@ static void watchdog_handler(int sig)
 
     /* if a pre-defined number of ticks passed by kills itself */
     if (__sync_add_and_fetch(&watchdog_ctx.ticks, 1) > WATCHDOG_MAX_TICKS) {
-        _exit(1);
+        kill(-getpgrp(), SIGTERM);
     }
 }
 
@@ -127,8 +127,8 @@ static errno_t watchdog_fd_recv_data(int fd)
 }
 
 static void watchdog_fd_read_handler(struct tevent_context *ev,
-                                                struct tevent_fd *fde,
-                                                    uint16_t flags,
+                                     struct tevent_fd *fde,
+                                     uint16_t flags,
                                      void *data)
 {
     errno_t ret;

```
"""

See the full comment at 
https://github.com/SSSD/sssd/pull/107#issuecomment-270127095
_______________________________________________
sssd-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to