Disable the software watchdog. */
| 2195 | |
| 2196 | /* Disable the software watchdog. */ |
| 2197 | void disableWatchdog(void) { |
| 2198 | struct sigaction act; |
| 2199 | if (g_pserver->watchdog_period == 0) return; /* Already disabled. */ |
| 2200 | watchdogScheduleSignal(0); /* Stop the current timer. */ |
| 2201 | |
| 2202 | /* Set the signal handler to SIG_IGN, this will also remove pending |
| 2203 | * signals from the queue. */ |
| 2204 | sigemptyset(&act.sa_mask); |
| 2205 | act.sa_flags = 0; |
| 2206 | act.sa_handler = SIG_IGN; |
| 2207 | sigaction(SIGALRM, &act, NULL); |
| 2208 | g_pserver->watchdog_period = 0; |
| 2209 | } |
| 2210 | |
| 2211 | /* Positive input is sleep time in microseconds. Negative input is fractions |
| 2212 | * of microseconds, i.e. -10 means 100 nanoseconds. */ |
no test coverage detected