Skip to content

Commit dcdb676

Browse files
committed
test.pl: Harden watchdog against glitches
Only one type of watchdog timer supposedly can exist. But I can see the possibility that a temporary glitch in the system caused a fallback type to be used. This commit simply makes sure that when cancelling, anything out there gets cancelled, instead of assuming there's just one possibility.
1 parent c240d36 commit dcdb676

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/test.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,11 +1851,11 @@ ($;$)
18511851
$watchdog_thread->kill('KILL');
18521852
undef $watchdog_thread;
18531853
}
1854-
elsif ($watchdog_process) {
1854+
if ($watchdog_process) {
18551855
kill('KILL', $watchdog_process);
18561856
undef $watchdog_process;
18571857
}
1858-
elsif ($watchdog_alarm) {
1858+
if ($watchdog_alarm) {
18591859
alarm(0);
18601860
undef $watchdog_alarm;
18611861
}

0 commit comments

Comments
 (0)