In the last episode (Jul 03), Per Hedbor () @ Pike (-) developers forum said:
Previous text:
This is on Linux, I presume. The libc call is guarded by a mutex, so it should be thread safe as long as no nonpike threads use it.
I had two pike-threads that did gethostbyname().
This on RH9. They sometimes randomly got the same answer.
The problem isn't gethostbyname() itself, it's the returned buffer. Pike needs to copy the data to a separate area before releasing gethostbyname_mutex.