From 535ead45038582e685a382d463409c3f990b587d Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sun, 1 Dec 2024 19:07:46 +0100 Subject: [PATCH] Add --no-manage-active-runtime flag --- server/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/main.cpp b/server/main.cpp index 2a8ef5b0..1348253a 100644 --- a/server/main.cpp +++ b/server/main.cpp @@ -204,6 +204,7 @@ pid_t app_pid; bool quitting_main_loop; bool do_fork; +bool do_active_runtime; bool avahi_publish; guint listener_watch; @@ -322,7 +323,8 @@ void start_server() update_fsm(); }, nullptr); } - runtime_setter.emplace(); + if (do_active_runtime) + runtime_setter.emplace(); } void kill_app() @@ -913,6 +915,7 @@ int main(int argc, char * argv[]) std::string config_file; app.add_option("-f", config_file, "configuration file")->option_text("FILE")->check(CLI::ExistingFile); + auto no_active_runtime = app.add_flag("--no-manage-active-runtime")->description("don't set the active runtime on connection"); auto no_instructions = app.add_flag("--no-instructions")->group(""); auto no_fork = app.add_flag("--no-fork")->description("disable fork to serve connection")->group("Debug"); auto no_publish = app.add_flag("--no-publish-service")->description("disable publishing the service through avahi"); @@ -925,6 +928,7 @@ int main(int argc, char * argv[]) CLI11_PARSE(app, argc, argv); + do_active_runtime = not *no_active_runtime; do_fork = not *no_fork; avahi_publish = not *no_publish; if (*no_encrypt)