Jakob �stergaard wrote:
> > I assume there are thread safe versions kicking around somewhere too, but
> > I've never used them so don't know how they work (do they alloc the struct
> > and return it, or just use TLS?).
>
> I'd guess that since the standard glibc is thread-safe now, gethostbyname()
> will also be thread safe.
No. gethostbyname() cannot be made re-entrant, due to the way in which
it allocates its memory.
However, glibc-2 has gethostbyname_r(), which is re-entrant (the
'hostent' buffer is passed in by the caller).
--
Glynn Clements <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]