Date: Wed, 24 Aug 2005 10:27:32 -0500 (CDT) From: Sergey Babkin <babkin@verizon.net> To: Jeremie Le Hen <jeremie@le-hen.org>, Warner Losh <imp@bsdimp.com> Cc: deischen@FreeBSD.org, freebsd-hackers@FreeBSD.org, lists@nbux.com Subject: Re: Re: nagios and freebsd threads issue : help please ... Message-ID: <13362915.1124897252422.JavaMail.root@vms069.mailsrvcs.net>
next in thread | raw e-mail | index | archive | help
>> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13362915.1124897252422.JavaMail.root>