summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2011-12-02 23:23:00 +1100
committerTony Cook <tony@develop-help.com>2011-12-03 13:04:28 +1100
commit1a34b28b1ed3a7c3a6b92fad22f321ae7c49f0e7 (patch)
treed0e8c5eb6469acfefa1a320221584c8fda7a5182 /t
parent78325d7a7e6183fba46cbfb1dbd40def2996b940 (diff)
downloadperl-1a34b28b1ed3a7c3a6b92fad22f321ae7c49f0e7.tar.gz
more reliably kill a runaway test process on cygwin
Sometimes a plain kill isn't enough. Along with the previous change this reliably kills a blocked t/op/threads.t on cygwin as needed. This doesn't attempt to fix the underlying bug (which may be in Win32, cygwin or perl itself)
Diffstat (limited to 't')
-rw-r--r--t/test.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/test.pl b/t/test.pl
index a664720a9a..66d6e07c9c 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -1329,6 +1329,11 @@ sub watchdog ($;$)
if (kill(0, $pid_to_kill)) {
_diag($timeout_msg);
kill('KILL', $pid_to_kill);
+ if ($is_cygwin) {
+ # sometimes the above isn't enough on cygwin
+ sleep 1; # wait a little, it might have worked after all
+ system("/bin/kill -f $pid_to_kill");
+ }
}
# Don't execute END block (added at beginning of this file)