In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Eddie Stassen <[EMAIL PROTECTED]> wrote: >> It appears that the use of non thread-safe library functions are >> responsible for this. > > Uh, yeah. Why didn't I think of that. > Sorry...
Well, you should be able to link against thread-safe variants of those functions, right? I mean, strtok() is obviously not thread safe, but localtime() should be. It's probably just a matter of linking against the right library. libc_r instead of libc, most likely. I think Linux turns on thread-safety if you define -DREENTRANT and link with -pthreads. Other systems might need other magic incantations. Like FreeBSD, and probably Solaris. > The changes MUSt be made for safety. I'll take a look at doing some >of the work over the next few days. Don't just substitute all library functions for their _r equivalents, just find out how to link against the thread-safe libc variant. Mike. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html