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/


In reply to Socket connection killing program by minixman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.