Skip Menu |

This queue is for tickets about the Socket CPAN distribution.

Report information
The Basics
Id: 97773
Status: resolved
Priority: 0/
Queue: Socket

People
Owner: Nobody in particular
Requestors: TONYC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.015



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~
On Wed Aug 06 01:46:46 2014, TONYC wrote: Show quoted text
> 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.
yes, looks good. kill is too slow on cygwin. I have to use at least a 50ms sleep everywhere. -- Reini Urban
Applied. Will be in next release. -- Paul Evans
Released in 2.015 -- Paul Evans