You're viewing a comment by Derek Callaway and its responses.
You're viewing a comment by Derek Callaway and its responses.
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
I love to read science books. They make my day and I get ideas for awesome blog posts, such as Busy Beaver, On Functors, Recursive Regular Expressions and many others.
Take a look at my
Amazon wish list, if you're curious about what I have planned reading next, and want to surprise me. :)
If you are interested in advertising on catonmat.net, contact me.
Free tools for coding on Vietstarsoft.com.
Programming homework help.


You could have used gethostbyname2_r() in C. The default resolver functions aren't re-entrant because they use thread-specific data in libc. It's not standard, but it's included in netdb.h on both Linux and BSD. I've successfully used the standard gethostbyname() function in concurrent programming by isolating the critical section with a POSIX Threads mutex. There's a download link to the source code of my nameserver security scanner which demonstrates this here:
http://www.security-database.com/toolswatch/PorkBind-updated-to-1-3.html
Reply To This Comment