Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: michael.virnstein [...] brodos.de
Cc:
AdminCc:

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



Subject: Use of uninitialized value in hash element at /usr/local/lib/perl5/site_perl/5.8.1/Net/Server/PreFork.pm line 443
The following code in Prefork.pm has errors: ### periodically make sure children are alive if( $time - $prop->{last_checked_for_dead} > $prop->{check_for_dead} ){ $prop->{last_checked_for_dead} = $time; foreach (keys %{ $prop->{children} }){ ### see if the child can be killed if( ! kill(0,$_) ){ $self->delete_child($_); $prop->{tally}->{ $prop->{children}->{status} } --; } } } should be: ### periodically make sure children are alive if( $time - $prop->{last_checked_for_dead} > $prop->{check_for_dead} ){ $prop->{last_checked_for_dead} = $time; foreach (keys %{ $prop->{children} }){ ### see if the child can be killed if( ! kill(0,$_) ){ $self->delete_child($_); $prop->{tally}->{ $prop->{children}->{$_}->{status} } --; } } }
From: michael.virnstein [...] brodos.de
On Di. 11. Jul. 2006, 05:09:44, guest wrote: Show quoted text
> should be: > > ### periodically make sure children are alive > if( $time - $prop->{last_checked_for_dead} > $prop->{check_for_dead} ){ > $prop->{last_checked_for_dead} = $time; > foreach (keys %{ $prop->{children} }){ > ### see if the child can be killed > if( ! kill(0,$_) ){ > $self->delete_child($_); > $prop->{tally}->{ $prop->{children}->{$_}->{status} } --; > } > } > }
oops, still wrong :> here's the correct version: if( $time - $prop->{last_checked_for_dead} > $prop->{check_for_dead} ){ $prop->{last_checked_for_dead} = $time; foreach (keys %{ $prop->{children} }){ ### see if the child can be killed if( ! kill(0,$_) ){ $prop->{tally}->{ $prop->{children}->{$_}->{status} } --; $self->delete_child($_); } } }
From: michael.virnstein [...] brodos.de
On Di. 11. Jul. 2006, 05:09:44, guest wrote: Show quoted text
> should be: > > ### periodically make sure children are alive > if( $time - $prop->{last_checked_for_dead} > $prop->{check_for_dead} ){ > $prop->{last_checked_for_dead} = $time; > foreach (keys %{ $prop->{children} }){ > ### see if the child can be killed > if( ! kill(0,$_) ){ > $self->delete_child($_); > $prop->{tally}->{ $prop->{children}->{$_}->{status} } --; > } > } > }
oops, still wrong :> here's the correct version: if( $time - $prop->{last_checked_for_dead} > $prop->{check_for_dead} ){ $prop->{last_checked_for_dead} = $time; foreach (keys %{ $prop->{children} }){ ### see if the child can be killed if( ! kill(0,$_) ){ $prop->{tally}->{ $prop->{children}->{$_}->{status} } --; $self->delete_child($_); } } }
Similar patch applied to 0.94. Thank you.