mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
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:
parent
ac78c4bb6c
commit
e19d1bb2f3
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user