nagios and freebsd threads issue : help please ...
Sergey Babkin
babkin at verizon.net
Wed Aug 24 15:27:33 GMT 2005
>> > This is funny, because nagios apparently runs properly on Linux, HPUX,
>> > Solaris, Irix, AIX and Tru64. To me that seems to indicate that Nagios
This does not neccessary mean that it _really_ works.
There might be a race involved that usually ends up
lucky on these systems.
>> > is very portable indeed and that the BSD fellows somehow botched it. I
>> > might be wrong, but...
>>
>> Just because it works doesn't make it standards conforming.
>>
>> Maybe there's some simple extension that can be implemented to help
>> the situation.
>
>It seems the main problem of the Nagios developper seems to be they
>would need to rewrite a big part of their current implementation.
>I'm not sure however this is mandatory. I wonder if the so-told
>pthread_atfork() handler wouldn't be a quick solution to address the
>problem. Sorry if it's dumb.
I'd even say that it's the proper correct solution.
This probably should me made a part of "how to write thread-safe libraries":
register pthread_atfork() function that would free every possible
mutex and conditional in the library.
And clean up the other state too.
-SB
More information about the freebsd-hackers
mailing list