Skip Menu |

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

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

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

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



Subject: Small patch so things work on Windows.
Index: t/01live.t =================================================================== --- t/01live.t (revision 2118) +++ t/01live.t (working copy) @@ -11,7 +11,7 @@ my $s=HTTP::Server::Simple->new(13432); is($s->port(),13432,"Constructor set port correctly"); my $pid=$s->background(); -like($pid, qr/^\d+$/,'pid is numeric'); +like($pid, qr/^-?\d+$/,'pid is numeric'); my $content=LWP::Simple::get("http://localhost:13432"); like($content,qr/Congratulations/,"Returns a page"); is(kill(9,$pid),1,'Signaled 1 process successfully'); Index: lib/HTTP/Server/Simple.pm =================================================================== --- lib/HTTP/Server/Simple.pm (revision 2118) +++ lib/HTTP/Server/Simple.pm (working copy) @@ -79,9 +79,11 @@ my $child =fork ; die "Can't fork: $!" unless defined($child); return $child if $child; + unless ($^O =~ /win32/i) { use POSIX; POSIX::setsid() or die "Can't start a new session: $!"; + } $self->run(); }
Date: Wed, 26 Jan 2005 09:02:27 -0500
From: jesse <jesse [...] fsck.com>
To: Guest via RT <bug-HTTP-Server-Simple [...] rt.cpan.org>
CC: undisclosed-recipients: ;
Subject: Re: [cpan #11176] Small patch so things work on Windows.
RT-Send-Cc:
Thanks. Applied On Fri, Jan 21, 2005 at 01:48:39PM -0500, Guest via RT wrote: Show quoted text
> > This message about HTTP-Server-Simple was sent to you by guest <> via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=11176 > > > Index: t/01live.t > =================================================================== > --- t/01live.t (revision 2118) > +++ t/01live.t (working copy) > @@ -11,7 +11,7 @@ > my $s=HTTP::Server::Simple->new(13432); > is($s->port(),13432,"Constructor set port correctly"); > my $pid=$s->background(); > -like($pid, qr/^\d+$/,'pid is numeric'); > +like($pid, qr/^-?\d+$/,'pid is numeric'); > my $content=LWP::Simple::get("http://localhost:13432"); > like($content,qr/Congratulations/,"Returns a page"); > is(kill(9,$pid),1,'Signaled 1 process successfully'); > Index: lib/HTTP/Server/Simple.pm > =================================================================== > --- lib/HTTP/Server/Simple.pm (revision 2118) > +++ lib/HTTP/Server/Simple.pm (working copy) > @@ -79,9 +79,11 @@ > my $child =fork ; > die "Can't fork: $!" unless defined($child); > return $child if $child; > + unless ($^O =~ /win32/i) { > use POSIX; > POSIX::setsid() > or die "Can't start a new session: $!"; > + } > $self->run(); > } >
--