Subject: | prevent t/socketpair.t hanging on Cygwin |
t/socketpair.t includes code to prevent hangs, but unfortunately this isn't enough to prevent hangs on Cygwin.
The attached patch uses the same mechanism's as t/test.pl in the perl source to ensure the process is killed on Cygwin.
This won't fix the bug (which is probably a Cygwin bug), but it will prevent my cygwin perl smoker from hanging in t/socketpair.t.
The test doesn't hang every time it's run, maybe 1 in 10 for me.
Tony
Subject: | Socket-socketpair.t |
Only in Socket-2.014/: const-c.inc
Only in Socket-2.014/: const-xs.inc
Only in Socket-2.014/: Makefile.old
diff -ru Socket-2.014-old/t/socketpair.t Socket-2.014/t/socketpair.t
--- Socket-2.014-old/t/socketpair.t 2013-09-03 22:22:48.000000000 +1000
+++ Socket-2.014/t/socketpair.t 2014-08-06 15:35:27.388239900 +1000
@@ -35,6 +35,11 @@
}
warn "Something unexpectedly hung during testing";
kill "INT", $parent or die "Kill failed: $!";
+ if ($^O eq "cygwin") {
+ # sometimes the above isn't enough on cygwin
+ sleep 1; # wait a little, it might have worked after all
+ system("/bin/kill -f $parent; echo die $parent");
+ }
exit 1;
}
}
Only in Socket-2.014/t: socketpair.t~