Skip Menu |

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

Report information
The Basics
Id: 43238
Status: resolved
Priority: 0/
Queue: Net-Server

People
Owner: Nobody in particular
Requestors: rt-cpan [...] triv.org
Cc:
AdminCc:

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



Subject: Can't disable backgrounding from the command line
When deciding to background the process or not, Net::Server checks if the background property is defined. However, there is no way to undefine something on the command line. If your server has a default setting of backgrounding, you can't force it to the foreground at the command line. Testing background for truth lets you do './server.pl background=0'. The attached patch has the change. -- Chris Reinhardt chris@triv.org
Subject: net-server.patch
--- Server.pm.orig 2009-02-12 12:05:20.000000000 -0500 +++ Server.pm 2009-02-12 12:06:10.000000000 -0500 @@ -288,7 +288,7 @@ if (! $ENV{BOUND_SOCKETS}) { ### background the process - unless we are hup'ing - if( $prop->{setsid} || defined($prop->{background}) ){ + if( $prop->{setsid} || $prop->{background} ){ my $pid = eval{ safe_fork() }; if( not defined $pid ){ $self->fatal( $@ ); } exit(0) if $pid;
Yes. That as a dumb original line of code on my part. It has been corrected. Thankyou for the report. The code is updated as of the just released version 2.000