Messages in this thread | | | From | Topi Miettinen <> | Subject | bind sucks? | Date | Tue, 12 Aug 1997 17:28:23 +0300 |
| |
I was wondering why mirroring a large site sometimes fails with "bind: Address already in use" after having transferred a lot of files. It seems to boil down to the following (fails in 2.0.30 and 2.0.30+pre4, not in 2.0.20). Notice strange regularity (724+725x, another run gave 719+740x, another 325+740x).
> cat socktest.pl #!/usr/bin/perl
for ($i=0; $i <100000 ; $i++) { socket(S, 2,1,6); bind(S, pack("S n a4 x8", 2, 0, "\0\0\0\0")) || print "bind $! $i " . $err++ . "\n"; close (S); } print "Errors: $err Total $i\n"; > ./socktest.pl bind Address already in use 724 0 bind Address already in use 1449 1 bind Address already in use 2174 2 bind Address already in use 2899 3 bind Address already in use 3624 4 bind Address already in use 4349 5 bind Address already in use 5074 6 bind Address already in use 5799 7 bind Address already in use 6524 8 (cut)
-Topi
-- G? d s++:- a- C++ UL++++ P++++ L++>+++ E W+ N- !o K? w+ !O !M !V PS+ PE++ Y+ PGP++ !t 5? X+ !R tv b++ DI++ !D G+ e+++ h---- r+++ y?
| |