freebsd-ports/net/p5-Net-Server/files/patch-lib_Net_Server.pm
Sam Lawrance db021693e9 Fix a bug which causes Net::Server based programs to break when restarted
with the HUP signal.

Submitter sent a patch upstream as rt.cpan.org ticket 14155

PR:		ports/84904
Submitted by:	Lupe Christoph <lupe@lupe-christoph.de>
		(maintainer of munin-node, which is affected by this bug)
2005-09-06 04:28:01 +00:00

12 lines
433 B
Perl

Patch for rt.cpan.org ticket 14155
--- lib/Net/Server.pm.orig Tue Sep 6 13:50:52 2005
+++ lib/Net/Server.pm Tue Sep 6 13:50:59 2005
@@ -49,7 +49,7 @@
### save for a HUP
my $script = $0;
- $script = $ENV{'PWD'} .'/'. $0 if $ENV{'PWD'};
+ $script = $ENV{'PWD'} .'/'. $0 if exists $ENV{'PWD'} and $script !~ m(^/);
$self->{server}->{commandline} = [ $script, @ARGV ]
unless defined $self->{server}->{commandline};