---Louis A. Mamakos said: >> You could malloc() a struct hostent for each call to >> gethostby*(), each time registering the hostent in some list along with the >> thread's PID. If the same thread calls gethostby*, use the same buffer, or >> allocate a new one if another thread calls it. Have a static function be > called >> atexit to free all the mallocs. > > Yuk! > > If you're writing a multithreaded program, a slightly different API for > gethostbyname() is likely to be the least of your worries. > Yeah, that IS a horrible idea of mine. :) Changing the API should be a last resort, though, since we don't want to introduce to many FreeBSDisms into the already-fragmented-enough Unix world. Just a thought, how does Linux's GNU libc handle gethostby* in threaded apps? -Joe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
- gethostbyaddr() and threads. Dan Moschuk
- Re: gethostbyaddr() and threads. Tony Finch
- Re: gethostbyaddr() and threads. Dan Moschuk
- Re: gethostbyaddr() and threads. Wes Peters
- Re: gethostbyaddr() and threads. Brian McGovern
- Re: gethostbyaddr() and threads. Joe Groff
- Re: gethostbyaddr() and threads. Brian McGovern
- Re: gethostbyaddr() and threads. Steve Tarkalson
- Re: gethostbyaddr() and threads. Joe Groff
- Re: gethostbyaddr() and threads. Louis A. Mamakos
- Re: gethostbyaddr() and threads. Joe Groff
- Re: gethostbyaddr() and threads. Wes Peters
- Re: gethostbyaddr() and threads... Dan Moschuk
- Re: gethostbyaddr() and thr... Wes Peters
- Re: gethostbyaddr() and thr... Kip Macy
- Re: gethostbyaddr() and threads. Nate Williams
- Re: gethostbyaddr() and threads. Joe Groff
- Re: gethostbyaddr() and threads. Dan Moschuk
- Re: gethostbyaddr() and threads... Joe Groff
- Re: gethostbyaddr() and thr... Wes Peters
- Re: gethostbyaddr() and thr... Joe Groff