From 3eb688de5d3cdd7e23fc848d3550162eedd1a538 Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Fri, 22 Mar 2002 16:46:56 +0000 Subject: [PATCH] changed SOMAXCONN to 1024 reverted reaper() to waitpid() look code --- src/spong-server.pl | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/spong-server.pl b/src/spong-server.pl index 2ec5658..e758cb0 100755 --- a/src/spong-server.pl +++ b/src/spong-server.pl @@ -6,7 +6,7 @@ # There are one or more update processes that listen for status updates # from client programs. -# $Id: spong-server.pl,v 1.48 2002/01/11 19:28:44 sljohnson Exp $ +# $Id: spong-server.pl,v 1.49 2002/03/22 16:46:56 sljohnson Exp $ use lib "@@LIBDIR@@"; @@ -183,7 +183,7 @@ sub listen_for_clients { }; # Set up the socket to listen to - $sock = IO::Socket::INET->new( Listen => SOMAXCONN, + $sock = IO::Socket::INET->new( Listen => 1024, LocalPort => $main::SPONG_CLIENT_PORT, Proto => 'tcp', Timeout => 30, @@ -231,7 +231,7 @@ sub listen_for_updates { # Set up the socket to listen to my( $sock, $client ); - $sock = IO::Socket::INET->new( Listen => SOMAXCONN, + $sock = IO::Socket::INET->new( Listen => 1024, LocalPort => $main::SPONG_UPDATE_PORT, Proto => 'tcp', Timeout => 30, @@ -325,7 +325,7 @@ sub listen_for_bb_updates { # Set up the socket to listen to my( $sock, $client ); - $sock = IO::Socket::INET->new( Listen => SOMAXCONN, + $sock = IO::Socket::INET->new( Listen => 1024, LocalPort => $main::SPONG_BB_UPDATE_PORT, Proto => 'tcp', Timeout => 30, @@ -415,7 +415,7 @@ sub listen_for_queries { # Set up the socket to listen to my( $localTimeOut ) = 15 ; my( $sock, $client ); - $sock = IO::Socket::INET->new( Listen => SOMAXCONN, + $sock = IO::Socket::INET->new( Listen => 1024, LocalPort => $main::SPONG_QUERY_PORT, Proto => 'tcp', Timeout => 30, @@ -1540,14 +1540,14 @@ sub chld_handler { sub reaper { my $kid; - $kid = wait(); - $main::numchild--; - &debug("reaped kid $kid, # of child = $main::numchild"); +# $kid = wait(); +# $main::numchild--; +# &debug("reaped kid $kid, # of child = $main::numchild"); -# while( ($kid = waitpid(-1,&WNOHANG)) > 0 ) { -# $main::numchild--; -# &debug("reaped kid $kid, # of child = $main::numchild"); -# } + while( ($kid = waitpid(-1,&WNOHANG)) > 0 ) { + $main::numchild--; + &debug("reaped kid $kid"); + } # Reinstate signal handler in cae system uses sysV libs $SIG{'CHLD'} = \&reaper; -- 2.30.2