Commit Graph

19 Commits

Author SHA1 Message Date
Marcel Hollerbach 1eb24301fd 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 <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10006
2019-09-19 14:50:42 -07:00
Mike Blumenkrantz 26d73cbae1 eio: make inotify monitors fork-safe
@fix
2018-02-02 16:59:44 -05:00
Carsten Haitzler 24b77d8ed9 eio monitor - remove unused vars and fix warning 2017-04-21 16:39:06 +09:00
Cedric BAIL 9bd80d542c eio: use new API eina_file_close_on_exec. 2017-04-18 16:56:40 -07:00
Cedric Bail 57226d86ff eio: handle failure due to lack of access right. 2016-07-15 17:07:49 -07:00
Cedric Bail e93d6f90db eio: avoid access after death of eio handler due to inotify triggering IN_IGNORED event. 2016-07-15 17:07:49 -07:00
Jean-Philippe Andre 8d9c6c0a00 inotify: Fix safety after read in 3 places
Fixes Coverity issues:
 - CID 1039565
 - CID 1039566
2014-10-28 10:54:51 +09:00
Jean-Philippe Andre 8fdd3992f0 Eio monitor: Fix crash on invalid data access
Fix race condition when touching/changing a (theme) file often.
An Eio_Monitor was marked as "delete_me" but the rename callback
was still called, leading to memory access to already freed
objects.

Test protocol was:
ELM_THEME=~/default.edj elementary_test &
watch touch ~/default.edj
2014-01-14 14:23:05 +09:00
Stefan Schmidt d2f8eaf6c8 eio: Check return code of fcntl()
CID 1039686
2013-08-07 15:18:19 +01:00
Chris Michael 8270fc29f3 ecore_main_fd_handler_fd_get can return -1 so check fd validity before
calling read() with potentially -1.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 11:24:11 +01:00
Chris Michael 5444ee0681 ecore_main_fd_handler_fd_get Can return -1 so check fd validity before
calling close() on it.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 10:56:37 +01:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Cedric Bail 8d5e33077e efl: use HAVE_FCNTL around call to fcntl. 2013-03-10 23:10:27 +09:00
Gustavo Sverzut Barbieri df701d8ca2 some clang warning cleanups i forgot to commit
SVN revision: 83024
2013-01-21 00:22:35 +00:00
Cedric BAIL 88ba56d9d5 efl: don't leak fd on exec.
SVN revision: 80434
2012-12-07 11:01:41 +00:00
Gustavo Sverzut Barbieri 6a5eaacc6a efl: common inotify checks, simplified.
Another try to make inotify checks more common.

This time uses AC_CHECK_HEADERS() as for others, that already define
HAVE_SYS_INOTIFY_H, then uses that.

I still kept AM_CONDITIONAL([HAVE_INOTIFY]) because I plan to convert
ecore_file to the same, smarter, method that is used in eio (compiling
the file depending on the backend.



SVN revision: 80358
2012-12-06 13:02:59 +00:00
Vincent Torri 8e1879ade9 inotify: revert : i want to keep autotools **modularized**. Instead, use in Eio what has been detected in Ecore_File.
SVN revision: 80298
2012-12-06 07:23:50 +00:00
Gustavo Sverzut Barbieri 9d93fc18da efl: simplify inotify by moving it to common.
also deprecate very ancient inotify usage by direct syscall.



SVN revision: 80292
2012-12-06 00:57:29 +00:00
Vincent Torri 81c86b19f6 merge: eio + fix compilation on windows + minor fixes + po files
don't move eio to IN-EFL right now


SVN revision: 80180
2012-12-04 17:40:58 +00:00