discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8a5abfbfc3ec40f860242faa583b33ea31b7cf1a

commit 8a5abfbfc3ec40f860242faa583b33ea31b7cf1a
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri May 6 15:32:58 2016 -0400

    eldbus: send exit/quit event upon disconnecting the session bus
    
    if an application is connected to the session bus, being disconnected
    should indicate that the session has been terminated and all applications
    in that session should also be terminated
    
    this ensures that no zombie processes will remain after the session bus dies
---
 src/lib/eldbus/eldbus_core.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/lib/eldbus/eldbus_core.c b/src/lib/eldbus/eldbus_core.c
index f5bfc4a..df3aab6 100644
--- a/src/lib/eldbus/eldbus_core.c
+++ b/src/lib/eldbus/eldbus_core.c
@@ -979,8 +979,17 @@ static void
 _disconnected(void *data, const Eldbus_Message *msg EINA_UNUSED)
 {
    Eldbus_Connection *conn = data;
+   Ecore_Event_Signal_Exit *ev;
+
    _eldbus_connection_event_callback_call(
       conn, ELDBUS_CONNECTION_EVENT_DISCONNECTED, NULL);
+   if (conn->type != ELDBUS_CONNECTION_TYPE_SESSION) return;
+
+   ev = calloc(1, sizeof(Ecore_Event_Signal_Exit));
+   if (!ev) return;
+
+   ev->quit = EINA_TRUE;
+   ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, ev, NULL, NULL);
 }
 
 /* Param address is only used for ELDBUS_CONNECTION_TYPE_ADDRESS type */

-- 


Reply via email to