util: remove fd_set_close_on_exec()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-04-18 11:39:06 +02:00
parent 4b83d526d6
commit 9d48852fed
2 changed files with 0 additions and 15 deletions

View File

@ -239,18 +239,4 @@ a_exec(const char *cmd)
execl(shell, shell, "-c", cmd, NULL); execl(shell, shell, "-c", cmd, NULL);
} }
/** Mark a file descriptor as close-on-exec.
* \param fd The file descriptor.
* \return The fcntl() return value.
*/
int
fd_set_close_on_exec(int fd)
{
int flags = fcntl(fd, F_GETFD, 0);
/* ignore errors */
if(flags < 0)
return flags;
return fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
}
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80

View File

@ -338,7 +338,6 @@ const char * orientation_tostr(orientation_t);
void *name_func_lookup(const char *, size_t, const name_func_link_t *); void *name_func_lookup(const char *, size_t, const name_func_link_t *);
const char * name_func_rlookup(void *, const name_func_link_t *); const char * name_func_rlookup(void *, const name_func_link_t *);
void a_exec(const char *); void a_exec(const char *);
int fd_set_close_on_exec(int);
#define a_asprintf(strp, fmt, ...) \ #define a_asprintf(strp, fmt, ...) \
do { \ do { \