forked from enlightenment/efl
fix duplicate function call names in ecore and ecore_con that can clash
this fixes T1341. also it removes the pointless return value from these two functions as the return is never used. also the ifdef in ecore_main.c seemed wrong as it wasd using fcntl not execvp but the ifdef was for execvp. this just never was discovered, so it's slid under the hood for a long time.
This commit is contained in:
parent
46b3643ff0
commit
4b24b386db
|
@ -273,23 +273,18 @@ static gboolean _ecore_glib_idle_enterer_called;
|
|||
static gboolean ecore_fds_ready;
|
||||
#endif
|
||||
|
||||
Eina_Bool
|
||||
void
|
||||
_ecore_fd_close_on_exec(int fd)
|
||||
{
|
||||
#ifdef HAVE_EXECVP
|
||||
#ifdef HAVE_FCNTL
|
||||
int flags;
|
||||
|
||||
flags = fcntl(fd, F_GETFD);
|
||||
if (flags == -1)
|
||||
return EINA_FALSE;
|
||||
|
||||
if (flags == -1) return;
|
||||
flags |= FD_CLOEXEC;
|
||||
if (fcntl(fd, F_SETFD, flags) == -1)
|
||||
return EINA_FALSE;
|
||||
return EINA_TRUE;
|
||||
if (fcntl(fd, F_SETFD, flags) == -1) return;
|
||||
#else
|
||||
(void) fd;
|
||||
return EINA_FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ Ecore_Fd_Handler *
|
|||
const void *buf_data);
|
||||
void *_ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler);
|
||||
|
||||
Eina_Bool _ecore_fd_close_on_exec(int fd);
|
||||
void _ecore_fd_close_on_exec(int fd);
|
||||
|
||||
void _ecore_main_shutdown(void);
|
||||
|
||||
|
|
|
@ -178,23 +178,18 @@ ecore_con_info_mcast_listen(Ecore_Con_Server *svr,
|
|||
return ecore_con_info_get(svr, done_cb, data, &hints);
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
_ecore_fd_close_on_exec(int fd)
|
||||
static void
|
||||
_ecore_con_fd_close_on_exec(int fd)
|
||||
{
|
||||
#ifdef HAVE_FCNTL
|
||||
int flags;
|
||||
|
||||
flags = fcntl(fd, F_GETFD);
|
||||
if (flags == -1)
|
||||
return EINA_FALSE;
|
||||
|
||||
if (flags == -1) return;
|
||||
flags |= FD_CLOEXEC;
|
||||
if (fcntl(fd, F_SETFD, flags) == -1)
|
||||
return EINA_FALSE;
|
||||
return EINA_TRUE;
|
||||
if (fcntl(fd, F_SETFD, flags) == -1) return;
|
||||
#else
|
||||
(void)fd;
|
||||
return EINA_FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -213,8 +208,8 @@ ecore_con_info_get(Ecore_Con_Server *svr,
|
|||
return 0;
|
||||
}
|
||||
|
||||
_ecore_fd_close_on_exec(fd[0]);
|
||||
_ecore_fd_close_on_exec(fd[1]);
|
||||
_ecore_con_fd_close_on_exec(fd[0]);
|
||||
_ecore_con_fd_close_on_exec(fd[1]);
|
||||
|
||||
cbdata = calloc(1, sizeof(CB_Data));
|
||||
if (!cbdata)
|
||||
|
|
Loading…
Reference in New Issue