From 554c0f7ad647d9cd66e380f567f2e842fff6a27a Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sat, 5 Oct 2024 15:33:39 +0200 Subject: [PATCH] Fix --no-fork parameter --- server/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/main.cpp b/server/main.cpp index e395a0b2..9919c19d 100644 --- a/server/main.cpp +++ b/server/main.cpp @@ -690,7 +690,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_instructions = app.add_flag("--no-instructions")->group(""); - do_fork = not app.add_flag("--no-fork")->description("disable fork to serve connection")->group("Debug"); + auto no_fork = app.add_flag("--no-fork")->description("disable fork to serve connection")->group("Debug"); #if WIVRN_USE_SYSTEMD // --application should only be used from wivrn-application unit file auto app_flag = app.add_flag("--application")->group(""); @@ -699,6 +699,8 @@ int main(int argc, char * argv[]) CLI11_PARSE(app, argc, argv); + do_fork = not *no_fork; + if (not config_file.empty()) configuration::set_config_file(config_file);