summaryrefslogtreecommitdiff
path: root/src/lib/elput
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-04-18 16:56:56 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-04-18 16:56:56 -0700
commitb12311804f2f5972f5a7304a81588c2ea405799a (patch)
tree97f689dd6695033ee36c0548447a144c642e3130 /src/lib/elput
parent9bd80d542ca98c0da01d20d262e3c7fbdc0dc1ff (diff)
elput: use new API eina_file_close_on_exec.
Diffstat (limited to 'src/lib/elput')
-rw-r--r--src/lib/elput/elput_evdev.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index e29600ce50..44999eb7c5 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -72,14 +72,7 @@ _keyboard_fd_get(off_t size)
72 72
73 if (fd < 0) return -1; 73 if (fd < 0) return -1;
74 74
75 flags = fcntl(fd, F_GETFD); 75 if (!eina_file_close_on_exec(fd, EINA_TRUE))
76 if (flags < 0)
77 {
78 close(fd);
79 return -1;
80 }
81
82 if (fcntl(fd, F_SETFD, (flags | FD_CLOEXEC)) == -1)
83 { 76 {
84 close(fd); 77 close(fd);
85 return -1; 78 return -1;