Pathc: Nagios threads

Andreas Ericsson ae at op5.se
Mon May 2 13:56:49 CEST 2005


Ahoy.

I've just noticed that Nagios doesn't define _REENTRANT or _THREAD_SAFE 
anywhere, although glibc and linuxthreads requires it to make functions 
thread safe. I'm not sure what difference it makes on some systems, but 
I've got a hunch it might mitigate the crash in 
service_result_worker_threads which seems to happen on SMP-enabled 
systems (where system calls can actually happen at the same time) using 
an older version of glibc (2.1.3) and its corresponding linuxthreads 
(also from 2000-something).

Apply the patch with
patch -p1 < nagios-threadsafe.diff
and please test this on other systems, as I'm not sure it works with 
Solaris and friends that have a history of broken system headers.
BSD systems should have no problems with it.

Cheers.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nagios-threadsafe.diff
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20050502/84d40139/attachment.ksh>


More information about the Developers mailing list