Fix: erroneous specifier used with ERR_FMT macro
[lttng-tools.git] / src / bin / lttng-sessiond / main.cpp
index 8d59952d6d404b408dba3c77eb0838615790baa4..bfd53e7e47041818996b55d9bb15266901688ebf 100644 (file)
@@ -52,6 +52,7 @@
 #include <common/futex.hpp>
 #include <common/ini-config/ini-config.hpp>
 #include <common/kernel-consumer/kernel-consumer.hpp>
+#include <common/lockfile.hpp>
 #include <common/logging-utils.hpp>
 #include <common/path.hpp>
 #include <common/relayd/relayd.hpp>
@@ -1403,7 +1404,7 @@ static void sessiond_uuid_log()
 /*
  * main
  */
-int main(int argc, char **argv)
+static int _main(int argc, char **argv)
 {
        int ret = 0, retval = 0;
        const char *env_app_timeout;
@@ -1975,3 +1976,13 @@ exit_set_signal_handler:
                exit(EXIT_FAILURE);
        }
 }
+
+int main(int argc, char **argv)
+{
+       try {
+               return _main(argc, argv);
+       } catch (const std::exception& e) {
+               ERR_FMT("Unhandled exception caught by main thread: {}", e.what());
+               abort();
+       }
+}
This page took 0.023462 seconds and 4 git commands to generate.