test.pl: Try alarm if can't start watchdog on Win/VMS

Prior to this commit, the code gave up immediately if it tried
unsuccessfully to use a watchdog thread.  But the alarm method is still
available.  Drop down to try it.
This commit is contained in:
Karl Williamson 2025-09-22 05:37:07 -06:00 committed by Karl Williamson
parent ac78c4bb6c
commit e19d1bb2f3

View File

@ -1947,11 +1947,12 @@ sub watchdog ($;$)
$watchdog = system(1, $cmd);
}
};
if ($@ || ($watchdog <= 0)) {
_diag('Failed to start watchdog');
_diag($@) if $@;
if ($@ || $watchdog <= 0) {
$@ = "\n$@" if $@;
_diag("Failed to start watchdog$@\nTrying alternate method");
undef($watchdog);
return;
goto WATCHDOG_VIA_ALARM;
}
# Add END block to parent to terminate and clean up watchdog