[icinga-checkins] icinga.org: icinga-core/mfriedrich/workers: core: use a command-file worker #2957

git at icinga.org git at icinga.org
Sun Aug 5 23:32:12 CEST 2012


Module: icinga-core
Branch: mfriedrich/workers
Commit: c6ea6a678397158dd9527bca4f7afed7c2525d40
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=c6ea6a678397158dd9527bca4f7afed7c2525d40

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sun Aug  5 17:09:18 2012 +0200

core: use a command-file worker #2957

the command file worker thread is the only location where we actually
keep a thread running, and therefore needing to fiddle with making
everything reentrant.
basically, the command-file worker thread was increasing the buffer on
new commands. Replacing that with a process, we can safely remove the
threading, but making use of libicinga with the worker, iobroker and
iocache architecture set.

quote from the original patch

"On sane systems, we should be able to add the command pipe directly
to the iobroker_set to be polled by the main process, but it appears
OSX (and thus FreeBSD) have crap support for polling filesystem pipes
along with sockets in a single. Solaris and Irix appear to have some
similar issues, according to some basic google-fu, so in the best
spirit of mathematicians we remove a difficult problem (lots of
exception-handling) in the master process by reducing it to one we've
already solved and put command file polling, reading and forwarding
into a separate process."

meaning to say, we've got it done within libicinga already, removing a
lot of error handling from the core.

refs #2957

---

 base/icinga.c    |   29 +----
 base/utils.c     |  359 +++++++++++++++++++++---------------------------------
 include/icinga.h |    6 +-
 3 files changed, 143 insertions(+), 251 deletions(-)

Diff:   https://git.icinga.org/?p=icinga-core.git;a=commitdiff;h=c6ea6a678397158dd9527bca4f7afed7c2525d40




More information about the icinga-checkins mailing list