Skip Menu |
 

This queue is for tickets about the HTTP-Server-Simple CPAN distribution.

Report information
The Basics
Id: 11409
Status: resolved
Priority: 0/
Queue: HTTP-Server-Simple

People
Owner: Nobody in particular
Requestors: corion [...] corion.net
Cc:
AdminCc:

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



Date: Mon, 07 Feb 2005 21:10:58 +0100
From: Max Maischein <corion [...] corion.net>
To: bug-HTTP-Server-Simple [...] rt.cpan.org
Subject: v0.02 fails tests on Win32 due to negative PID and unimplemented setsid()
Download (untitled) / with headers
text/plain 950b
Hi Jesse, HTTP::Server::Simple fails its test due to two reasons: 1) The POSIX::setsid() function is not implemented on Win32 and dies. Modifying the C<background> subroutine as follows makes that work: sub background { my $self=shift; my $child =fork ; die "Can't fork: $!" unless defined($child); return $child if $child; use POSIX; if ($^O !~ /MSWin32/) { POSIX::setsid() or die "Can't start a new session: $!"; }; $self->run(); } 2) PIDs on Win32 Perl can be negative, which t/01_live.t doesn't account for. The following test does that: <like($pid, qr/^\d+$/,'pid is numeric'); Show quoted text
>like($pid, qr/^-?\d+$/,'pid is numeric');
Thanks for writing this module! I have Test::HTTP::LocalServer, which does something similar, but fires up a different kind of httpd - maybe the two modules should be merged, or I can reuse your server, but I'm wary of fork() on Win32 ... Have fun, -max
Date: Mon, 7 Feb 2005 15:10:02 -0500
From: jesse <jesse [...] fsck.com>
To: Max Maischein via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
CC: undisclosed-recipients: ;
Subject: Re: [cpan #11409] v0.02 fails tests on Win32 due to negative PID and unimplemented setsid()
RT-Send-Cc:
Can you test 0.03, which should already be on CPAN and should specifically fix this issue?


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.