develooper Front page | perl.perl5.porters | Postings from January 2001

socket/vec/select combination failing (Was OK: perl v5.7.0 +DEVEL8301 on i686-linux 2.4.0-prerelease-ac4)

Thread Previous | Thread Next
From:
andreas.koenig
Date:
January 3, 2001 04:50
Subject:
socket/vec/select combination failing (Was OK: perl v5.7.0 +DEVEL8301 on i686-linux 2.4.0-prerelease-ac4)
Message ID:
m366jw7qb6.fsf@ak-71.mind.de
There's a grain od salt in the combination of linux-2.4.0, gcc-2.95.2,
and glibc-2.2. The test is adapted from Net::Telnet. Watch for the 6th
command, it should return FALSE but returns 1. The commands 7ff are
just for illustration:

  DB<1> use Socket

  DB<2> x socket SOCK, AF_INET, SOCK_STREAM, 0
0  1
  DB<3> x fileno(SOCK)
0  6
  DB<4> x vec($bitmask='', fileno(SOCK), 1) = 1;
0  1
  DB<5> x $bitmask
0  '@'
  DB<6> x $nfound = select($bitmask, '', '', 0)
0  1
  DB<7> x $bitmask                             
0  '@'
  DB<8> x sysread SOCK, $scalar, 128           
0  undef
  DB<9> x $!
0  'Transport endpoint is not connected'
  DB<10> x $scalar
0  ''

Can anybody suggest where to look and what to try and tell me how
serious in trouble this system is? And should that test become part of
the core test suite?

The above can be reproduced with 5.7.0 and anything I tried after it,
it fails, too, with 5.6.0 and 5.005_03, so this does not look like a
perl problem. But it needs to be addressed.


-- 
andreas

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About