forked from enlightenment/enlightenment
remove DISPLAY usage from E_IPC_SOCKET value
pid should be enough here CID 1039791
This commit is contained in:
parent
2343ab165a
commit
5651eb6c3f
|
@ -17,7 +17,7 @@ EINTERN int
|
||||||
e_ipc_init(void)
|
e_ipc_init(void)
|
||||||
{
|
{
|
||||||
char buf[4096], buf2[128], buf3[4096];
|
char buf[4096], buf2[128], buf3[4096];
|
||||||
char *tmp, *user, *disp, *disp2, *base;
|
char *tmp, *user, *base;
|
||||||
int pid, trynum = 0, id1 = 0;
|
int pid, trynum = 0, id1 = 0;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
|
@ -71,15 +71,6 @@ e_ipc_init(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
disp = getenv("DISPLAY");
|
|
||||||
if (!disp) disp = ":0";
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* $DISPLAY may be a path (e.g. Xquartz), keep the basename. */
|
|
||||||
disp2 = strrchr(disp, '/');
|
|
||||||
if (disp2) disp = disp2 + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
e_util_env_set("E_IPC_SOCKET", "");
|
e_util_env_set("E_IPC_SOCKET", "");
|
||||||
|
|
||||||
pid = (int)getpid();
|
pid = (int)getpid();
|
||||||
|
@ -96,8 +87,8 @@ e_ipc_init(void)
|
||||||
(S_IRWXU | S_IFDIR)))
|
(S_IRWXU | S_IFDIR)))
|
||||||
{
|
{
|
||||||
#ifdef USE_IPC
|
#ifdef USE_IPC
|
||||||
snprintf(buf3, sizeof(buf3), "%s/%s-%i",
|
snprintf(buf3, sizeof(buf3), "%s/%i",
|
||||||
buf, disp, pid);
|
buf, pid);
|
||||||
_e_ipc_server = ecore_ipc_server_add
|
_e_ipc_server = ecore_ipc_server_add
|
||||||
(ECORE_IPC_LOCAL_SYSTEM, buf3, 0, NULL);
|
(ECORE_IPC_LOCAL_SYSTEM, buf3, 0, NULL);
|
||||||
if (_e_ipc_server)
|
if (_e_ipc_server)
|
||||||
|
|
Loading…
Reference in New Issue