summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/BuildInstallSettings.cmake2
-rw-r--r--cpp/src/cluster.cmake5
-rw-r--r--cpp/src/config.h.cmake2
-rw-r--r--cpp/src/qpid/cluster/WatchDogPlugin.cpp3
4 files changed, 11 insertions, 1 deletions
diff --git a/cpp/BuildInstallSettings.cmake b/cpp/BuildInstallSettings.cmake
index e611a141c9..60d6b14e11 100644
--- a/cpp/BuildInstallSettings.cmake
+++ b/cpp/BuildInstallSettings.cmake
@@ -129,4 +129,6 @@ if (UNIX)
"Directory to load client plug-in modules from")
set (QPIDD_MODULE_DIR ${QPID_INSTALL_LIBDIR}/qpid/daemon CACHE STRING
"Directory to load broker plug-in modules from")
+ set (QPID_LIBEXEC_DIR libexec/qpid CACHE STRING
+ "Directory for executables used by qpid libs")
endif (UNIX)
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 );