debugging while running multi-threaded

classic Classic list List threaded Threaded
2 messages Options
| Threaded
Open this post in threaded view
|

debugging while running multi-threaded

Joe Maimon
log output is not protected....

a mutex would probably be a good idea in vradlog for debug mode.
I am testing something like that now.


Joe
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
| Threaded
Open this post in threaded view
|

Re: debugging while running multi-threaded

Alan DeKok
Joe Maimon <[hidden email]> wrote:
> a mutex would probably be a good idea in vradlog for debug mode.
> I am testing something like that now.

  Mutexes are expensive.  Instead, write the data to a local buffer
via snprintf, and call write().

  It's still not perfect, but the odds of problems occuring are less.

  Alan DeKok.



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html