Introduce configure --with-lttng-system-rundir
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 19 Aug 2013 18:38:02 +0000 (14:38 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 19 Aug 2013 18:38:02 +0000 (14:38 -0400)
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 <mathieu.desnoyers@efficios.com>
configure.ac
include/ust-comm.h

index a59e8ce8449dc458b9a4d6b51ae404df3b41296b..94f81829d9a24ef82e91fe2490712397a61fbbe4 100644 (file)
@@ -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
index 7f268b7fe08b6c7b4197a8d8c908053d23e28962..ae53f158e83dc338ae09e43047ef8adda154a1fc 100644 (file)
@@ -31,6 +31,7 @@
 #include <lttng/ust-abi.h>
 #include <lttng/ust-error.h>
 #include <lttng/ust-compiler.h>
+#include <config.h>
 
 /*
  * 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) */
This page took 0.026009 seconds and 4 git commands to generate.