summaryrefslogtreecommitdiff
path: root/src/lib/eio
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-03-09 16:16:45 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-03-09 16:17:58 -0800
commitaef1ee96e854cc0e4991559c9346288c5cd82c38 (patch)
tree82686ab46351caeb412a72386047e2ee4c221c8a /src/lib/eio
parent168d2a14460918f8b658add7e5d71807bd24ee19 (diff)
eio: avoid crash during shutdown due to Ecore_Event queue.
Diffstat (limited to 'src/lib/eio')
-rw-r--r--src/lib/eio/eio_monitor.c37
1 files changed, 26 insertions, 11 deletions
diff --git a/src/lib/eio/eio_monitor.c b/src/lib/eio/eio_monitor.c
index 5c4eb8fbb1..ccc13c4339 100644
--- a/src/lib/eio/eio_monitor.c
+++ b/src/lib/eio/eio_monitor.c
@@ -140,17 +140,20 @@ _eio_monitor_error_cb(void *data, Eio_File *handler EINA_UNUSED, int error)
140void 140void
141eio_monitor_init(void) 141eio_monitor_init(void)
142{ 142{
143 EIO_MONITOR_ERROR = ecore_event_type_new(); 143 if (EIO_MONITOR_ERROR == 0)
144 EIO_MONITOR_SELF_RENAME = ecore_event_type_new(); 144 {
145 EIO_MONITOR_SELF_DELETED = ecore_event_type_new(); 145 EIO_MONITOR_ERROR = ecore_event_type_new();
146 EIO_MONITOR_FILE_CREATED = ecore_event_type_new(); 146 EIO_MONITOR_SELF_RENAME = ecore_event_type_new();
147 EIO_MONITOR_FILE_DELETED = ecore_event_type_new(); 147 EIO_MONITOR_SELF_DELETED = ecore_event_type_new();
148 EIO_MONITOR_FILE_MODIFIED = ecore_event_type_new(); 148 EIO_MONITOR_FILE_CREATED = ecore_event_type_new();
149 EIO_MONITOR_FILE_CLOSED = ecore_event_type_new(); 149 EIO_MONITOR_FILE_DELETED = ecore_event_type_new();
150 EIO_MONITOR_DIRECTORY_CREATED = ecore_event_type_new(); 150 EIO_MONITOR_FILE_MODIFIED = ecore_event_type_new();
151 EIO_MONITOR_DIRECTORY_DELETED = ecore_event_type_new(); 151 EIO_MONITOR_FILE_CLOSED = ecore_event_type_new();
152 EIO_MONITOR_DIRECTORY_MODIFIED = ecore_event_type_new(); 152 EIO_MONITOR_DIRECTORY_CREATED = ecore_event_type_new();
153 EIO_MONITOR_DIRECTORY_CLOSED = ecore_event_type_new(); 153 EIO_MONITOR_DIRECTORY_DELETED = ecore_event_type_new();
154 EIO_MONITOR_DIRECTORY_MODIFIED = ecore_event_type_new();
155 EIO_MONITOR_DIRECTORY_CLOSED = ecore_event_type_new();
156 }
154 157
155 eio_monitor_backend_init(); 158 eio_monitor_backend_init();
156 eio_monitor_fallback_init(); 159 eio_monitor_fallback_init();
@@ -168,6 +171,18 @@ eio_monitor_shutdown(void)
168 Eina_Iterator *it; 171 Eina_Iterator *it;
169 Eio_Monitor *monitor; 172 Eio_Monitor *monitor;
170 173
174 ecore_event_type_flush(EIO_MONITOR_ERROR,
175 EIO_MONITOR_SELF_RENAME,
176 EIO_MONITOR_SELF_DELETED,
177 EIO_MONITOR_FILE_CREATED,
178 EIO_MONITOR_FILE_DELETED,
179 EIO_MONITOR_FILE_MODIFIED,
180 EIO_MONITOR_FILE_CLOSED,
181 EIO_MONITOR_DIRECTORY_CREATED,
182 EIO_MONITOR_DIRECTORY_DELETED,
183 EIO_MONITOR_DIRECTORY_MODIFIED,
184 EIO_MONITOR_DIRECTORY_CLOSED);
185
171 it = eina_hash_iterator_data_new(_eio_monitors); 186 it = eina_hash_iterator_data_new(_eio_monitors);
172 EINA_ITERATOR_FOREACH(it, monitor) 187 EINA_ITERATOR_FOREACH(it, monitor)
173 { 188 {