From 751d4e910613be142f5590ed91590a8e3f3299ef Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 19 Aug 2013 14:38:02 -0400 Subject: [PATCH] Introduce configure --with-lttng-system-rundir Allow overriding the path where the system-wide sessiond is expected to keep its runtime files. It does _not_ allow multiple instances of system-wide sessiond to run in parallel though, because the wait shm files still requires having only one single system-wide sessiond at any given time. Signed-off-by: Mathieu Desnoyers --- configure.ac | 8 ++++++++ include/ust-comm.h | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a59e8ce8..94f81829 100644 --- a/configure.ac +++ b/configure.ac @@ -262,6 +262,14 @@ AS_IF([test "x$with_sdt" = "xyes"],[ ]) ]) +AC_ARG_WITH([lttng-system-rundir], + AS_HELP_STRING([--with-lttng-system-rundir], + [Location of the system directory where LTTng-UST expects the system-wide lttng-sessiond runtime files. The default is "/var/run/lttng".]), + [lttng_system_rundir="$withval"], + [lttng_system_rundir="/var/run/lttng"]) +AC_DEFINE_UNQUOTED([LTTNG_SYSTEM_RUNDIR], ["$lttng_system_rundir"], + [LTTng system runtime directory]) + AC_CONFIG_FILES([ Makefile doc/Makefile diff --git a/include/ust-comm.h b/include/ust-comm.h index 7f268b7f..ae53f158 100644 --- a/include/ust-comm.h +++ b/include/ust-comm.h @@ -31,6 +31,7 @@ #include #include #include +#include /* * Default timeout the application waits for the sessiond to send its @@ -40,7 +41,7 @@ */ #define LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS 3000 -#define LTTNG_DEFAULT_RUNDIR "/var/run/lttng" +#define LTTNG_DEFAULT_RUNDIR LTTNG_SYSTEM_RUNDIR #define LTTNG_DEFAULT_HOME_RUNDIR ".lttng" /* Queue size of listen(2) */ -- 2.34.1