summaryrefslogtreecommitdiff
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
parent662f7d33105029b664b57848cc7afec7bf7a6387 (diff)
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
53ecore_file_monitor_backend_init(void) 53ecore_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);