elput: use new API eina_file_close_on_exec.

This commit is contained in:
Cedric BAIL 2017-04-18 16:56:56 -07:00
parent 9bd80d542c
commit b12311804f
1 changed files with 1 additions and 8 deletions

View File

@ -72,14 +72,7 @@ _keyboard_fd_get(off_t size)
if (fd < 0) return -1;
flags = fcntl(fd, F_GETFD);
if (flags < 0)
{
close(fd);
return -1;
}
if (fcntl(fd, F_SETFD, (flags | FD_CLOEXEC)) == -1)
if (!eina_file_close_on_exec(fd, EINA_TRUE))
{
close(fd);
return -1;