MCPcopy Create free account
hub / github.com/F-Stack/f-stack / watchdogSignalHandler

Function watchdogSignalHandler

app/redis-6.2.6/src/debug.c:1910–1926  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1908#include <sys/time.h>
1909
1910void watchdogSignalHandler(int sig, siginfo_t *info, void *secret) {
1911#ifdef HAVE_BACKTRACE
1912 ucontext_t *uc = (ucontext_t*) secret;
1913#else
1914 (void)secret;
1915#endif
1916 UNUSED(info);
1917 UNUSED(sig);
1918
1919 serverLogFromHandler(LL_WARNING,"\n--- WATCHDOG TIMER EXPIRED ---");
1920#ifdef HAVE_BACKTRACE
1921 logStackTrace(getMcontextEip(uc), 1);
1922#else
1923 serverLogFromHandler(LL_WARNING,"Sorry: no support for backtrace().");
1924#endif
1925 serverLogFromHandler(LL_WARNING,"--------\n");
1926}
1927
1928/* Schedule a SIGALRM delivery after the specified period in milliseconds.
1929 * If a timer is already scheduled, this function will re-schedule it to the

Callers

nothing calls this directly

Calls 3

serverLogFromHandlerFunction · 0.85
logStackTraceFunction · 0.85
getMcontextEipFunction · 0.85

Tested by

no test coverage detected