Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gethotbyname error continued

[Frank Ramsay: Tue, Jun 18, 2002 at 07:52:38PM +0000]
> It is hitting gethostbyname (I put in printfs to be sure sure) and I tried 
> changing the sethostent(0) to sethostent(1) and it didn't help
> I've discovered that it stops working on the 1022n'd call _every time_
> (I removed the sleep in the main loop to get it to run faster) And that is 
> very strange and I'm wondering if it's a bug in the library itself.


you're running out of filedescriptors..

you do socket() to open a connection but you never do a close()...

gethostbyname() can't get a fd (which it needs to open() /etc/hosts)
because they're all in use by your sockets.

you aren't using all those sockets - close them.


BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /