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)



Return-Path: <corion [...] corion.net>
X-Original-To: bug-HTTP-Server-Simple [...] rt.cpan.org
Delivered-To: cpan-bug+http-server-simple [...] diesel.bestpractical.com
X-Greylist: delayed 401 seconds by postgrey-1.16 at diesel; Mon, 07 Feb 2005 15:07:44 EST
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 010AE4D80AF for <bug-HTTP-Server-Simple [...] rt.cpan.org>; Mon, 7 Feb 2005 15:07:43 -0500 (EST)
Received: (qmail 11579 invoked by alias); 7 Feb 2005 20:00:31 -0000
X-Spam-Check-BY: la.mx.develooper.com
Received-SPF: neutral (x1.develooper.com: local policy)
Received: from natjimbo.rzone.de (HELO natjimbo.rzone.de) (81.169.145.162) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 07 Feb 2005 12:00:25 -0800
Received: from aliens (pD9EA7A12.dip.t-dialin.net [217.234.122.18]) by post.webmailer.de (8.13.1/8.13.1) with ESMTP id j17K0K0I007063 for <bug-HTTP-Server-Simple [...] rt.cpan.org>; Mon, 7 Feb 2005 21:00:20 +0100 (MET)
Received: from [192.168.1.19] (helo=[192.168.1.19]) by aliens with esmtp (Exim 3.35 #1 (Debian)) id 1CyFH6-0006Sb-00 for <bug-HTTP-Server-Simple [...] rt.cpan.org>; Mon, 07 Feb 2005 21:14:24 +0100
Message-ID: <4207CB52.40707 [...] corion.net>
Date: Mon, 07 Feb 2005 21:10:58 +0100
From: Max Maischein <corion [...] corion.net>
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 [...] rt.cpan.org
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 [...] bestpractical.com>
X-Original-To: bug-HTTP-Server-Simple [...] rt.cpan.org
Delivered-To: cpan-bug+http-server-simple [...] diesel.bestpractical.com
Received: by diesel.bestpractical.com (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 [...] 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()
Message-ID: <20050207201002.GY31068 [...] bestpractical.com>
References: <rt-11409 [...] cpan> <rt-11409-32687.12.9672108495556 [...] cpan.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <rt-11409-32687.12.9672108495556 [...] cpan.org>
User-Agent: Mutt/1.5.6+20040722i
RT-Send-Cc:
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 Perl.org infrastructure.

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