libwww3.0 really isn't thread-safe...

found this one today.

HTTCP.c and HTNews.c both use gethostbyname --- a seemingly innocuous
call, which returns a pointer to a static struct hostent.

wait, did someone say STATIC?

yup, that's right --- it ain't reentrant (at least on Alphas using
POSIX threads!). The fix? Easy enough --- use gethostbyname_r (the
re-entrant version) and #define _REENTRANT (or #define _THREAD_SAFE).

I'll post patches if someone likes.

Cheers,
-Erik

Received on Friday, 23 June 1995 19:02:26 UTC