summaryrefslogtreecommitdiff
path: root/src/lib/eldbus
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-05-06 15:32:58 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-05-06 15:41:38 -0400
commit8a5abfbfc3ec40f860242faa583b33ea31b7cf1a (patch)
treed30a91f6777fdb1407f0163b2f22c4ab36c4fa0b /src/lib/eldbus
parent236c13df34576c51473463d9f0ef5247810e89e3 (diff)
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
Diffstat (limited to 'src/lib/eldbus')
-rw-r--r--src/lib/eldbus/eldbus_core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/eldbus/eldbus_core.c b/src/lib/eldbus/eldbus_core.c
index f5bfc4a447..df3aab698e 100644
--- a/src/lib/eldbus/eldbus_core.c
+++ b/src/lib/eldbus/eldbus_core.c
@@ -979,8 +979,17 @@ static void
979_disconnected(void *data, const Eldbus_Message *msg EINA_UNUSED) 979_disconnected(void *data, const Eldbus_Message *msg EINA_UNUSED)
980{ 980{
981 Eldbus_Connection *conn = data; 981 Eldbus_Connection *conn = data;
982 Ecore_Event_Signal_Exit *ev;
983
982 _eldbus_connection_event_callback_call( 984 _eldbus_connection_event_callback_call(
983 conn, ELDBUS_CONNECTION_EVENT_DISCONNECTED, NULL); 985 conn, ELDBUS_CONNECTION_EVENT_DISCONNECTED, NULL);
986 if (conn->type != ELDBUS_CONNECTION_TYPE_SESSION) return;
987
988 ev = calloc(1, sizeof(Ecore_Event_Signal_Exit));
989 if (!ev) return;
990
991 ev->quit = EINA_TRUE;
992 ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, ev, NULL, NULL);
984} 993}
985 994
986/* Param address is only used for ELDBUS_CONNECTION_TYPE_ADDRESS type */ 995/* Param address is only used for ELDBUS_CONNECTION_TYPE_ADDRESS type */