| 2136 | #include <sys/time.h> |
| 2137 | |
| 2138 | void watchdogSignalHandler(int sig, siginfo_t *info, void *secret) { |
| 2139 | #ifdef HAVE_BACKTRACE |
| 2140 | ucontext_t *uc = (ucontext_t*) secret; |
| 2141 | #else |
| 2142 | (void)secret; |
| 2143 | #endif |
| 2144 | UNUSED(info); |
| 2145 | UNUSED(sig); |
| 2146 | |
| 2147 | serverLogFromHandler(LL_WARNING,"\n--- WATCHDOG TIMER EXPIRED ---"); |
| 2148 | #ifdef HAVE_BACKTRACE |
| 2149 | logStackTrace(getMcontextEip(uc), 1); |
| 2150 | #elif defined UNW_LOCAL_ONLY |
| 2151 | logStackTrace(NULL, 1); |
| 2152 | #else |
| 2153 | serverLogFromHandler(LL_WARNING,"Sorry: no support for backtrace()."); |
| 2154 | #endif |
| 2155 | serverLogFromHandler(LL_WARNING,"--------\n"); |
| 2156 | } |
| 2157 | |
| 2158 | /* Schedule a SIGALRM delivery after the specified period in milliseconds. |
| 2159 | * If a timer is already scheduled, this function will re-schedule it to the |
nothing calls this directly
no test coverage detected