Module: check_mk
Branch: master
Commit: 902c06f484c4b8e42d348394670f738012f013ac
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=902c06f484c4b8…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Mon Dec 11 13:36:15 2017 +0100
Windows agent: wrap some more handles with RAII
Wrap file, job, pipe and mutex handles, among others. Parameterize job
handle traits with non-type job exit code parameter.
Add stream operator for WrappedHandle (e.g. for logging purposes).
TODO: 1) Replace Windows mutex-based implementation with std::mutex.
2) Wrap handles in OHM monitor (requires regression tests).
Change-Id: Ia6279e6519033f9e0a8952038a6b58135bdea57e
---
agents/windows/EventLog.h | 11 ---
agents/windows/ExternalCmd.cc | 73 ++++++++--------
agents/windows/ExternalCmd.h | 17 ++--
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent.cc | 45 +++++-----
agents/windows/dynamic_func.h | 8 +-
agents/windows/sections/SectionLogwatch.cc | 26 +++---
agents/windows/sections/SectionPS.cc | 49 ++++++-----
agents/windows/sections/SectionPS.h | 8 +-
agents/windows/sections/SectionPluginGroup.cc | 50 +++++------
agents/windows/sections/SectionPluginGroup.h | 5 +-
agents/windows/test/typesTest.cc | 31 ++++++-
agents/windows/types.h | 117 ++++++++++++--------------
13 files changed, 226 insertions(+), 216 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=902c06f484…