Subject: | [Patch] Prefork - When killing a child "waiting" value in tally is wrongly decreased 2 times |
Date: | Fri, 01 Sep 2006 22:21:03 +0200 |
To: | bug-Net-Server [...] rt.cpan.org |
From: | Carlos Velasco <carlos.velasco [...] nimastelecom.com> |
Hello,
In Preform module, when killing a process throug HUP, waiting value in
tally is decreased 2 times.
I think the superfluous line is in kill_n_children. Here is a patch.
diff -ur Net-Server-0.94/lib/Net/Server/PreFork.pm
Net-Server-0.94_patched/lib/Net/Server/PreFork.pm
--- Net-Server-0.94/lib/Net/Server/PreFork.pm 2006-07-12
04:46:30.000000000 +0200
+++ Net-Server-0.94_patched/lib/Net/Server/PreFork.pm 2006-09-01
22:16:24.000000000 +0200
@@ -161,7 +161,8 @@
next unless $prop->{children}->{$_}->{status} eq 'waiting';
$n --;
- $prop->{tally}->{waiting} --;
+ # HUP register_sig in run_parent already does that
+ #$prop->{tally}->{waiting} --;
### try to kill the child
kill('HUP',$_) or $self->delete_child( $_ );
Regards,
Carlos Velasco