On Fri, 28 Mar 2008, Eino Tuominen wrote:
> When debugging my application I noticed that c-ares is calling rand(). From
> Solaris 9 man pages:
>
> "The rand() is unsafe in multithreaded applications."
Indeed. Even the Linux man page says: "The function rand() is not reentrant or
thread-safe".
The Linux man page suggests using rand_r() or even better drand48_r() instead.
What's the best alternative on Solaris 9?
-- c-ares -- my preferred DNS asynch resolver libraryReceived on 2008-03-28