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

Owner: Nobody in particular
Requestors: corion [...]

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

Return-Path: <corion [...]>
X-Original-To: bug-HTTP-Server-Simple [...]
Delivered-To: cpan-bug+http-server-simple [...]
X-Greylist: delayed 401 seconds by postgrey-1.16 at diesel; Mon, 07 Feb 2005 15:07:44 EST
Received: from ( []) by (Postfix) with SMTP id 010AE4D80AF for <bug-HTTP-Server-Simple [...]>; Mon, 7 Feb 2005 15:07:43 -0500 (EST)
Received: (qmail 11579 invoked by alias); 7 Feb 2005 20:00:31 -0000
Received-SPF: neutral ( local policy)
Received: from (HELO ( by (qpsmtpd/0.28) with ESMTP; Mon, 07 Feb 2005 12:00:25 -0800
Received: from aliens ( []) by (8.13.1/8.13.1) with ESMTP id j17K0K0I007063 for <bug-HTTP-Server-Simple [...]>; Mon, 7 Feb 2005 21:00:20 +0100 (MET)
Received: from [] (helo=[]) by aliens with esmtp (Exim 3.35 #1 (Debian)) id 1CyFH6-0006Sb-00 for <bug-HTTP-Server-Simple [...]>; Mon, 07 Feb 2005 21:14:24 +0100
Message-ID: <4207CB52.40707 [...]>
Date: Mon, 07 Feb 2005 21:10:58 +0100
From: Max Maischein <corion [...]>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: de-DE, de, en-us, en
MIME-Version: 1.0
To: bug-HTTP-Server-Simple [...]
Subject: v0.02 fails tests on Win32 due to negative PID and unimplemented setsid()
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: iso-8859-15
Content-Length: 950
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
Return-Path: <jesse [...]>
X-Original-To: bug-HTTP-Server-Simple [...]
Delivered-To: cpan-bug+http-server-simple [...]
Received: by (Postfix, from userid 1000) id D059D4D80BF; Mon, 7 Feb 2005 15:10:02 -0500 (EST)
Date: Mon, 7 Feb 2005 15:10:02 -0500
From: jesse <jesse [...]>
To: Max Maischein via RT <bug-HTTP-Server-Simple [...]>
CC: undisclosed-recipients: ;
Subject: Re: [cpan #11409] v0.02 fails tests on Win32 due to negative PID and unimplemented setsid()
Message-ID: <20050207201002.GY31068 [...]>
References: <rt-11409 [...] cpan> <rt-11409-32687.12.9672108495556 [...]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <rt-11409-32687.12.9672108495556 [...]>
User-Agent: Mutt/1.5.6+20040722i
X-RT-Original-Encoding: us-ascii
Content-Length: 93
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 infrastructure.

Please report any issues with to