minixman has asked for the wisdom of the Perl Monks concerning the following question:
All i have the following socket code.
my $server = IO::Socket::INET->new( Proto => 'tcp', LocalPort => $serverport, Listen => SOMAXCONN, Reuse => 1); die "can't setup server" unless $server; &writelog("$date: INFO: Server $0 started accepting clients <br>connec +tions"); while ($client = $server->accept()) { $client->autoflush(1); my $hostinfo = gethostbyaddr($client->peeraddr); my $remoteclient = $hostinfo->name; &writelog("$date: INFO: New client connection from <br> $remoteclie +nt"); while ( <$client>) { next unless /\S/; # blank line
Now when run this on my suse 9.1 kernel Linux 2.6.4-52-default
i get no issues i can telnet to the port and works fine.
when i run this on my 2.6.5-7.193-smp
I telnet localhost the port 9000 and connects i exit, perfect
when i try and telnet from another machine ie windows to the socket it connects then the program exits and stop running
.
This does not happen on my first machine.
Is there a debug i can use.
20051012 Janitored by Corion: Added code tags, formatting
2005-10-12 Retitled by Arunbear; s/Sock/Socket/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sock connection killing program
by sgifford (Prior) on Oct 12, 2005 at 21:05 UTC | |
|
Re: Socket connection killing program
by doctor_moron (Scribe) on Oct 13, 2005 at 03:11 UTC | |
|
Re: Socket connection killing program
by talexb (Chancellor) on Oct 12, 2005 at 18:40 UTC | |
|
Re: Socket connection killing program
by 5mi11er (Deacon) on Oct 12, 2005 at 18:57 UTC |