path: root/src/lib/eio/eio_monitor_cocoa.c
diff options
authorMarcel Hollerbach <>2019-09-18 11:32:08 +0200
committerCedric Bail <>2019-09-19 14:50:42 -0700
commit1eb24301fd517952e7e2c31a19c523bd4bf2e06e (patch)
treea92b6439937c74caaa42485fed69778f7f072303 /src/lib/eio/eio_monitor_cocoa.c
parent3e9f619b1d3fa3c66641292c11992e5730307b13 (diff)
efl_io_model: next try to fix this race condition
what is happening is that a file gets announced through eio_model listing code, at this point of time, the monitor does not yet know about the file. If the file now gets deleted between the annoncing and the learning of the file from the monitor, then the file got an ADD event, but no DEL event. Which is a bug. With this commit there is a new API which asks the monitor if the file already has the knowledge about the files existance, or not. A few monitors like win32 inotify or cocoa do not have context about the file directly, if the OS is now having the same bug, then we are again in trouble, however, we canot do anything about that. In the case of kevent or poll, this asks the context of the monitor if the file is already there. Reviewed-by: Cedric BAIL <> Differential Revision:
Diffstat (limited to 'src/lib/eio/eio_monitor_cocoa.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/eio/eio_monitor_cocoa.c b/src/lib/eio/eio_monitor_cocoa.c
index d491de4..be35496 100644
--- a/src/lib/eio/eio_monitor_cocoa.c
+++ b/src/lib/eio/eio_monitor_cocoa.c
@@ -403,6 +403,10 @@ void eio_monitor_backend_del(Eio_Monitor *monitor)
403 eina_hash_del(_fsevent_monitors, monitor->path, backend); 403 eina_hash_del(_fsevent_monitors, monitor->path, backend);
404} 404}
405 405
406Eina_Bool eio_monitor_context_check(const Eio_Monitor *monitor, const char *path)
408 return EINA_TRUE;
406 410
407/*============================================================================* 411/*============================================================================*
408 * API * 412 * API *