Are neb_register_callback()s threadsafe?

Razvan Cojocaru razvan.cojocaru at 1and1.ro
Wed Sep 5 14:05:21 CEST 2012


> That depends on what you mean by "threadsafe". If you intend to use
> multiple threads in your own module, you'll have to take care not to
> do anything that upsets Nagios.

Obviously. Multiple threads are not involved.

> If you mean "will multiple Nagios threads try to rip my data out from
> under my feet?", then no, but other modules might.

Yes, the question was: assuming a single thread model, nothing fancy,
would it be possible that my_callback() gets called from several
Nagios-created threads?

Is write_to_all_logs() a candidate for race conditions (especially since
other modules / threads might very well use it)?


Thanks
-- 
Razvan Cojocaru

Linux Development Core Romania

1&1 Internet Development S.R.L. - Bucharest/Romania
Web: www.1und1.de


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list