From 6f3b004199a6b1bb0a8f5431d677ab926bdf19f3 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 3 Jun 2022 17:41:57 +0200 Subject: IPC and log changes, introduce signature --- src/debug/HyprCtl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/debug/HyprCtl.cpp') diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index c890dbb2..a8030992 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -266,11 +266,11 @@ void HyprCtl::startHyprCtlSocket() { return; } - unlink("/tmp/hypr/.socket.sock"); - sockaddr_un SERVERADDRESS = {.sun_family = AF_UNIX}; - strcpy(SERVERADDRESS.sun_path, "/tmp/hypr/.socket.sock"); + std::string socketPath = "/tmp/hypr/" + g_pCompositor->m_szInstanceSignature + "/.socket.sock"; + + strcpy(SERVERADDRESS.sun_path, socketPath.c_str()); bind(SOCKET, (sockaddr*)&SERVERADDRESS, SUN_LEN(&SERVERADDRESS)); @@ -282,7 +282,7 @@ void HyprCtl::startHyprCtlSocket() { char readBuffer[1024] = {0}; - Debug::log(LOG, "Hypr socket started."); + Debug::log(LOG, "Hypr socket started at %s", socketPath.c_str()); while(1) { const auto ACCEPTEDCONNECTION = accept(SOCKET, (sockaddr*)&clientAddress, &clientSize); -- cgit v1.2.3