aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_file
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-04-18 16:56:18 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-04-18 16:56:18 -0700
commit214e22bf7275537e85b92cea37f7759a31267b46 (patch)
treeaffc171831485404e7bfc424cae6784cd9c4a372 /src/lib/ecore_file
parentecore_con: use new API eina_file_close_on_exec. (diff)
downloadefl-214e22bf7275537e85b92cea37f7759a31267b46.tar.gz
ecore_file: use new API eina_file_close_on_exec.
Diffstat (limited to 'src/lib/ecore_file')
-rw-r--r--src/lib/ecore_file/ecore_file_monitor_inotify.c9
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
ecore_file_monitor_backend_init(void)
{
int fd;
-#ifdef HAVE_FCNTL
- int flags;
-#endif
fd = inotify_init();
if (fd < 0)
return 0;
-#ifdef HAVE_FCNTL
- flags = fcntl(fd, F_GETFD);
- flags |= FD_CLOEXEC;
- fcntl(fd, F_SETFD, flags);
-#endif
+ eina_file_close_on_exec(fd, EINA_TRUE);
_fdh = ecore_main_fd_handler_add(fd, ECORE_FD_READ, _ecore_file_monitor_inotify_handler,
NULL, NULL, NULL);