On Wed Jul 10 00:13:27 2013, xyf.xiao@gmail.com wrote: > This is a bug report for perl from xyf.xiao@gmail.com, > generated with the help of perlbug 1.39 running under perl 5.14.2. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > calling peerhost function after recv, can result crash and throw: > > > Bad arg length for Socket::unpack_sockaddr_in, length is 4096, should > be 16 at /usr/lib/perl5/5.14/i686-cygwin-threads-64int/Socket.pm line > 559. > > Below is test code which works fine in windows: > > use IO::Select; > use IO::Socket::INET; > > my $data; > > my $servSock = IO::Socket::INET->new(LocalPort => 6666, > Listen => 100,); > > my $select =IO::Select->new($servSock); > while(1){ > > my $clientSock = $servSock->accept(); > $select->add($clientSock); > $clientSock->recv( $data, 100, 0); > warn $clientSock->peerhost(); > close($clientSock); > } > How would I run this program on a Unix-like system and get meaningful output? --- via perlbug: queue: perl5 status: new https://rt.perl.org:443/rt3/Ticket/Display.html?id=118843Thread Previous | Thread Next