xwayland: Add code to cleanup xwayland on shutdown

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-09-08 12:30:34 -04:00 committed by Mike Blumenkrantz
parent 8f09e55b45
commit 5a7b3c5cf9
1 changed files with 21 additions and 0 deletions

View File

@ -229,6 +229,8 @@ fail:
close(wms[1]);
exs->wm_fd = wms[0];
/* TODO: watch process ?? */
if (exs->abs_hdlr)
ecore_main_fd_handler_del(exs->abs_hdlr);
if (exs->unx_hdlr)
@ -354,5 +356,24 @@ lock:
EAPI int
e_modapi_shutdown(E_Module *m EINA_UNUSED)
{
char path[256];
if (!exs) return 1;
unlink(exs->lock);
snprintf(path, sizeof(path), "/tmp/.X11-unix/X%d", exs->disp);
unlink(path);
if (exs->abs_hdlr) ecore_main_fd_handler_del(exs->abs_hdlr);
if (exs->unx_hdlr) ecore_main_fd_handler_del(exs->unx_hdlr);
close(exs->abs_fd);
close(exs->unx_fd);
if (exs->sig_hdlr) ecore_event_handler_del(exs->sig_hdlr);
free(exs);
return 1;
}