Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #8140] Add Check Result List Mutex for NEB modules #1536
This issue has been migrated from Redmine: https://dev.icinga.com/issues/8140
Created by jrhunt on 2014-12-24 21:31:47 +00:00
I have attached a patch that provides a new set of functions for registering file descriptors to be closed on fork().
First, a little history:
My team and I have developed a custom event broker module that understands NSCA wire protocol. Unlike the standalone NSCA daemon, this broker bypasses the command pipe and directly injects received results into the check results list. To deal with the inevitable corruption wherein the main thread performs a non-atomic update to the linked-list structure at the same time as our event broker, we had to patch Icinga to protect list access (in both add_check_result_to_list() and read_check_result()) with a mutex.
This is that patch.
2015-01-24 14:41:20 +00:00 by (unknown) 13c0e2b
2015-01-24 14:47:57 +00:00 by (unknown) 99f7339