forked from enlightenment/efl
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 <cedric@osg.samsung.com>
This commit is contained in:
parent
2aa2b63907
commit
1057a45493
|
@ -404,13 +404,13 @@ ecore_con_local_listen(Ecore_Con_Server *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_USER)
|
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)
|
else if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_LOCAL_SYSTEM)
|
||||||
{
|
{
|
||||||
const char *computername;
|
const char *computername;
|
||||||
|
|
||||||
computername = getenv("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);
|
svr->path = strdup(buf);
|
||||||
|
|
Loading…
Reference in New Issue