diff options
| author | Alan Conway <aconway@apache.org> | 2010-01-07 18:49:12 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2010-01-07 18:49:12 +0000 |
| commit | 2bad4c6c52865c9e4caf9f74127526ad65ff9456 (patch) | |
| tree | 918603b658b5be80d203106e1776161476662c1f /cpp/src | |
| parent | 1b384a882f165eb4067b55df0109d89a9d77b63c (diff) | |
| download | qpid-python-2bad4c6c52865c9e4caf9f74127526ad65ff9456.tar.gz | |
Add cluster watchdog plugin to cmake build.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@896959 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/cluster.cmake | 5 | ||||
| -rw-r--r-- | cpp/src/config.h.cmake | 2 | ||||
| -rw-r--r-- | cpp/src/qpid/cluster/WatchDogPlugin.cpp | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/cluster.cmake b/cpp/src/cluster.cmake index 6552c39f12..04f74264be 100644 --- a/cpp/src/cluster.cmake +++ b/cpp/src/cluster.cmake @@ -151,6 +151,11 @@ if (BUILD_CLUSTER) DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) + add_library (watchdog MODULE qpid/cluster/WatchDogPlugin.cpp) + set_target_properties (watchdog PROPERTIES PREFIX "") + + add_executable(qpidd_watchdog qpid/cluster/qpidd_watchdog.cpp) + endif (BUILD_CLUSTER) # Distribute all sources. diff --git a/cpp/src/config.h.cmake b/cpp/src/config.h.cmake index b3d0450822..a24500b860 100644 --- a/cpp/src/config.h.cmake +++ b/cpp/src/config.h.cmake @@ -37,6 +37,8 @@ #cmakedefine QPIDC_MODULE_DIR "${QPIDC_MODULE_DIR}" #cmakedefine QPIDD_MODULE_DIR "${QPIDD_MODULE_DIR}" +#cmakedefine QPID_LIBEXEC_DIR "${QPID_LIBEXEC_DIR}" + #define QPID_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}" #cmakedefine QPID_HAS_CLOCK_GETTIME diff --git a/cpp/src/qpid/cluster/WatchDogPlugin.cpp b/cpp/src/qpid/cluster/WatchDogPlugin.cpp index fc2b830dac..9b19b4f95f 100644 --- a/cpp/src/qpid/cluster/WatchDogPlugin.cpp +++ b/cpp/src/qpid/cluster/WatchDogPlugin.cpp @@ -38,6 +38,7 @@ clients of the stuck process to fail over to other members. */ +#include "config.h" #include "qpid/Plugin.h" #include "qpid/Options.h" #include "qpid/log/Statement.h" @@ -114,7 +115,7 @@ struct WatchDogPlugin : public qpid::Plugin, public qpid::sys::Fork { void child() { // Child of fork const char* watchdog = ::getenv("QPID_WATCHDOG_EXEC"); // For use in tests - if (!watchdog) watchdog=QPID_EXEC_DIR "/qpidd_watchdog"; + if (!watchdog) watchdog=QPID_LIBEXEC_DIR "/qpidd_watchdog"; std::string interval = boost::lexical_cast<std::string>(settings.interval); ::execl(watchdog, watchdog, interval.c_str(), NULL); QPID_LOG(critical, "Failed to exec watchdog program " << watchdog ); |
