From acb177bf4d7444882b88afea978772820df5eb68 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 30 Nov 2021 20:13:56 +0100 Subject: [PATCH] fixed an oopsie --- src/config/ConfigManager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 6e59245..71fccf8 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -115,7 +115,12 @@ void handleBind(const std::string& command, const std::string& value) { } void handleRawExec(const std::string& command, const std::string& args) { - exec(args.c_str()); + // Exec in the background dont wait for it. + if (fork() == 0) { + execl("/bin/sh", "/bin/sh", "-c", args.c_str(), nullptr); + + _exit(0); + } } void handleStatusCommand(const std::string& command, const std::string& args) {