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

Function disableWatchdog

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

Disable the software watchdog. */

Source from the content-addressed store, hash-verified

1965
1966/* Disable the software watchdog. */
1967void disableWatchdog(void) {
1968 struct sigaction act;
1969 if (server.watchdog_period == 0) return; /* Already disabled. */
1970 watchdogScheduleSignal(0); /* Stop the current timer. */
1971
1972 /* Set the signal handler to SIG_IGN, this will also remove pending
1973 * signals from the queue. */
1974 sigemptyset(&act.sa_mask);
1975 act.sa_flags = 0;
1976 act.sa_handler = SIG_IGN;
1977 sigaction(SIGALRM, &act, NULL);
1978 server.watchdog_period = 0;
1979}
1980
1981/* Positive input is sleep time in microseconds. Negative input is fractions
1982 * of microseconds, i.e. -10 means 100 nanoseconds. */

Callers 1

configSetCommandFunction · 0.85

Calls 2

watchdogScheduleSignalFunction · 0.85
sigactionClass · 0.70

Tested by

no test coverage detected