diff options
Diffstat (limited to 'src/lib/ecore_file')
-rw-r--r-- | src/lib/ecore_file/ecore_file_monitor_inotify.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/lib/ecore_file/ecore_file_monitor_inotify.c b/src/lib/ecore_file/ecore_file_monitor_inotify.c index dc84d4428a..e4cd3a69ad 100644 --- a/src/lib/ecore_file/ecore_file_monitor_inotify.c +++ b/src/lib/ecore_file/ecore_file_monitor_inotify.c | |||
@@ -53,19 +53,12 @@ int | |||
53 | ecore_file_monitor_backend_init(void) | 53 | ecore_file_monitor_backend_init(void) |
54 | { | 54 | { |
55 | int fd; | 55 | int fd; |
56 | #ifdef HAVE_FCNTL | ||
57 | int flags; | ||
58 | #endif | ||
59 | 56 | ||
60 | fd = inotify_init(); | 57 | fd = inotify_init(); |
61 | if (fd < 0) | 58 | if (fd < 0) |
62 | return 0; | 59 | return 0; |
63 | 60 | ||
64 | #ifdef HAVE_FCNTL | 61 | eina_file_close_on_exec(fd, EINA_TRUE); |
65 | flags = fcntl(fd, F_GETFD); | ||
66 | flags |= FD_CLOEXEC; | ||
67 | fcntl(fd, F_SETFD, flags); | ||
68 | #endif | ||
69 | 62 | ||
70 | _fdh = ecore_main_fd_handler_add(fd, ECORE_FD_READ, _ecore_file_monitor_inotify_handler, | 63 | _fdh = ecore_main_fd_handler_add(fd, ECORE_FD_READ, _ecore_file_monitor_inotify_handler, |
71 | NULL, NULL, NULL); | 64 | NULL, NULL, NULL); |