From d413388761c85c1bd153a4bbf8b6f96189cd416a Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 28 Aug 2022 11:19:08 +0200 Subject: Multiple improvements to the shutdown procedure --- src/debug/HyprCtl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/debug/HyprCtl.cpp') diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 6b89b3c6..2cf2781e 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -759,7 +759,7 @@ std::string getRequestFromThread(std::string rq) { } void HyprCtl::startHyprCtlSocket() { - std::thread([&]() { + tThread = std::thread([&]() { const auto SOCKET = socket(AF_UNIX, SOCK_STREAM, 0); if (SOCKET < 0) { @@ -806,5 +806,7 @@ void HyprCtl::startHyprCtlSocket() { } close(SOCKET); - }).detach(); + }); + + tThread.detach(); } -- cgit v1.2.3