summaryrefslogtreecommitdiff
path: root/src/lib/efreet
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-02 16:59:56 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-02 16:59:44 -0500
commit10ce0cbd8ac8d176a13d9be2e9e53a56a2a616ac (patch)
tree0f678014f8938968485db39d85e26ae848c79d88 /src/lib/efreet
parentaaf3659fafa3151e9ac685a9c07a2fa97113d30e (diff)
efreet: reset ipc connection after fork
ensure that existing connection is not reused
Diffstat (limited to 'src/lib/efreet')
-rw-r--r--src/lib/efreet/efreet_cache.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c
index 0df7a7b887..052e709b07 100644
--- a/src/lib/efreet/efreet_cache.c
+++ b/src/lib/efreet/efreet_cache.c
@@ -182,6 +182,22 @@ _cb_server_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
182} 182}
183 183
184static void 184static void
185_efreet_cache_reset()
186{
187 const char *s;
188 int len = 0;
189
190 if (ipc) ecore_ipc_server_del(ipc);
191 ipc = ecore_ipc_server_connect(ECORE_IPC_LOCAL_USER, "efreetd", 0, NULL);
192 if (!ipc) return;
193
194 s = efreet_language_get();
195 if (s) len = strlen(s);
196 ecore_ipc_server_send(ipc, 1, 0, 0, 0, 0, s, len);
197 efreet_icon_extensions_refresh();
198}
199
200static void
185_icon_desktop_cache_update_event_add(int event_type) 201_icon_desktop_cache_update_event_add(int event_type)
186{ 202{
187 Efreet_Event_Cache_Update *ev; 203 Efreet_Event_Cache_Update *ev;
@@ -330,6 +346,7 @@ efreet_cache_init(void)
330 } 346 }
331 } 347 }
332 } 348 }
349 ecore_fork_reset_callback_add(_efreet_cache_reset, NULL);
333 350
334 return 1; 351 return 1;
335error: 352error:
@@ -354,7 +371,7 @@ efreet_cache_shutdown(void)
354 ecore_event_type_flush(EFREET_EVENT_ICON_CACHE_UPDATE, 371 ecore_event_type_flush(EFREET_EVENT_ICON_CACHE_UPDATE,
355 EFREET_EVENT_DESKTOP_CACHE_UPDATE, 372 EFREET_EVENT_DESKTOP_CACHE_UPDATE,
356 EFREET_EVENT_DESKTOP_CACHE_BUILD); 373 EFREET_EVENT_DESKTOP_CACHE_BUILD);
357 374 ecore_fork_reset_callback_del(_efreet_cache_reset, NULL);
358 IF_RELEASE(theme_name); 375 IF_RELEASE(theme_name);
359 376
360 icon_cache = efreet_cache_close(icon_cache); 377 icon_cache = efreet_cache_close(icon_cache);