Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 42112
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

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

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



Subject: Cookie test hangs forever on Win32
Cookie test hangs forever for me after test 1 on my Win32 laptop, and after test 2 on my Win32 desktop, I imagine because HTTP::Server::Simple doesn't work on Win32 either and you're using it. This pretty much kills Mech on Windows, strongly recommend disabling or skipping all the test on Win32 that use HTTP::Server::Simple, until you can find a better test server to replace it.
Subject: Re: [rt.cpan.org #42112] Cookie test hangs forever on Win32
Date: Thu, 07 May 2009 13:40:14 +0200
To: bug-WWW-Mechanize [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Hi, the problem is not in HTTP::Server::Simple itself, the problem is that perl on Win32 implements "fork" call as an emulation via threads; thus it behaves slightly differently than to UNIX systems. In this case of cookies.t: - when calling "TestServer->spawn()" - it calls "HTTP::Server::Simple->background()" - that invokes "fork" call - in cookies.t we got back $pid that is in fact not a real PID corresponding to a real MS Windows process - $pid is a pseudo-value, as the forked process is not a real process but a thread - a hang-up point occures when we are gonna send SIGTERM signal to this $pid I do not know why but on Win32 sending SIGTERM(15) to forked process (in fact thread) hangs up (at least with our TestServer); however sending SIGKILL(9) works fine. Therefore the following "ditry patch" to cookies.t solves the issue: - my $nprocesses = kill 15, $pid; + my $nprocesses = kill 9, $pid; -- kmx
This is fixed in 1.55_01.