From 1057a45493011e3628c067586e0b3ac14cdbf63f Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 8 Oct 2015 22:33:30 +0200 Subject: [PATCH] Ecore_Con: make sure to create named pipe with a unique name Named pipes created with CreateNamedPipe() must have a unique name, so append the process Id to the name @fix Signed-off-by: Cedric BAIL --- src/lib/ecore_con/ecore_con_local_win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_con/ecore_con_local_win32.c b/src/lib/ecore_con/ecore_con_local_win32.c index cfeba72..6da9926 100644 --- a/src/lib/ecore_con/ecore_con_local_win32.c +++ b/src/lib/ecore_con/ecore_con_local_win32.c @@ -404,13 +404,13 @@ ecore_con_local_listen(Ecore_Con_Server *obj) } if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_USER) - snprintf(buf, sizeof(buf), "\\\\.\\pipe\\%s", svr->name); + snprintf(buf, sizeof(buf), "\\\\.\\pipe\\%s%ld", svr->name, GetProcessId(GetCurrentProcess())); else if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_SYSTEM) { const char *computername; computername = getenv("COMPUTERNAME"); - snprintf(buf, sizeof(buf), "\\\\%s\\pipe\\%s", computername, svr->name); + snprintf(buf, sizeof(buf), "\\\\%s\\pipe\\%s%ld", computername, svr->name, GetProcessId(GetCurrentProcess())); } svr->path = strdup(buf); -- 2.7.4