diff options
author | Tony Cook <tony@develop-help.com> | 2011-12-02 23:23:00 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2011-12-03 13:04:28 +1100 |
commit | 1a34b28b1ed3a7c3a6b92fad22f321ae7c49f0e7 (patch) | |
tree | d0e8c5eb6469acfefa1a320221584c8fda7a5182 /t | |
parent | 78325d7a7e6183fba46cbfb1dbd40def2996b940 (diff) | |
download | perl-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.pl | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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) |