From: Gary K. <gr...@re...> - 2006-08-21 05:35:15
|
Mark Doliner wrote: <snip> >> Why do we need a thread? Can't we use a watcher or listener in our ma= in >> loop? >=20 > We use either getaddrinfo() or gethostbyname(), and they are both block= ing. >=20 > -Mark I haven't looked at the changes, but I hope, now that it's threaded that we're using gethostbyname_r or gethostbyname2_r, since the man page says: The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it con=E2=80=90 tains pointers; a deep copy is required. This of course, is implementation specific. --=20 Gary Kramlich <gr...@re...> |