Browse Source

[core] rename fd_close_on_exec()

rename fd_close_on_exec() to fdevent_setfd_cloexec()
personal/stbuehler/mod-csrf
Glenn Strauss 4 years ago
parent
commit
685cab057e
  1. 2
      src/chunk.c
  2. 2
      src/fdevent.c
  3. 1
      src/fdevent.h
  4. 2
      src/fdevent_linux_sysepoll.c
  5. 2
      src/fdevent_solaris_devpoll.c
  6. 2
      src/mod_mysql_vhost.c
  7. 2
      src/mod_trigger_b4_dl.c
  8. 2
      src/mod_vhostdb_dbi.c
  9. 2
      src/mod_vhostdb_mysql.c
  10. 2
      src/stat_cache.c

2
src/chunk.c

@ -500,7 +500,7 @@ static chunk *chunkqueue_get_append_tempfile(server *srv, chunkqueue *cq) {
buffer_free(template);
return NULL;
}
fd_close_on_exec(fd);
fdevent_setfd_cloexec(fd);
c = chunkqueue_get_unused_chunk(cq);
c->type = FILE_CHUNK;

2
src/fdevent.c

@ -312,7 +312,7 @@ int fdevent_fcntl_set_nb(fdevents *ev, int fd) {
}
int fdevent_fcntl_set_nb_cloexec(fdevents *ev, int fd) {
fd_close_on_exec(fd);
fdevent_setfd_cloexec(fd);
return fdevent_fcntl_set_nb(ev, fd);
}

1
src/fdevent.h

@ -206,7 +206,6 @@ int fdevent_unregister(fdevents *ev, int fd);
void fdevent_sched_close(fdevents *ev, int fd, int issock);
void fdevent_sched_run(struct server *srv, fdevents *ev);
#define fd_close_on_exec(fd) fdevent_setfd_cloexec(fd)
void fdevent_setfd_cloexec(int fd);
void fdevent_clrfd_cloexec(int fd);
int fdevent_fcntl_set(fdevents *ev, int fd);

2
src/fdevent_linux_sysepoll.c

@ -139,7 +139,7 @@ int fdevent_linux_sysepoll_init(fdevents *ev) {
return -1;
}
fd_close_on_exec(ev->epoll_fd);
fdevent_setfd_cloexec(ev->epoll_fd);
ev->epoll_events = malloc(ev->maxfds * sizeof(*ev->epoll_events));
force_assert(NULL != ev->epoll_events);

2
src/fdevent_solaris_devpoll.c

@ -122,7 +122,7 @@ int fdevent_solaris_devpoll_reset(fdevents *ev) {
return -1;
}
fd_close_on_exec(ev->devpoll_fd);
fdevent_setfd_cloexec(ev->devpoll_fd);
return 0;
}
int fdevent_solaris_devpoll_init(fdevents *ev) {

2
src/mod_mysql_vhost.c

@ -218,7 +218,7 @@ SERVER_FUNC(mod_mysql_vhost_set_defaults) {
}
#undef FOO
fd_close_on_exec(s->mysql->net.fd);
fdevent_setfd_cloexec(s->mysql->net.fd);
}
}

2
src/mod_trigger_b4_dl.c

@ -182,7 +182,7 @@ SETDEFAULTS_FUNC(mod_trigger_b4_dl_set_defaults) {
"gdbm-open failed");
return HANDLER_ERROR;
}
fd_close_on_exec(gdbm_fdesc(s->db));
fdevent_setfd_cloexec(gdbm_fdesc(s->db));
}
#endif
#if defined(HAVE_PCRE_H)

2
src/mod_vhostdb_dbi.c

@ -49,7 +49,7 @@ static void mod_vhostdb_dbi_error_callback (dbi_conn dbconn, void *vdata)
while (++dbconf->reconnect_count <= 3) { /* retry */
if (0 == dbi_conn_connect(dbconn)) {
fd_close_on_exec(dbi_conn_get_socket(dbconn));
fdevent_setfd_cloexec(dbi_conn_get_socket(dbconn));
return;
}
}

2
src/mod_vhostdb_mysql.c

@ -110,7 +110,7 @@ static int mod_vhostdb_dbconf_setup (server *srv, array *opts, void **vdata)
return -1;
}
fd_close_on_exec(dbconn->net.fd);
fdevent_setfd_cloexec(dbconn->net.fd);
dbconf = (vhostdb_config *)calloc(1, sizeof(*dbconf));
dbconf->dbconn = dbconn;

2
src/stat_cache.c

@ -142,7 +142,7 @@ stat_cache *stat_cache_init(server *srv) {
FAMNoExists(&sc->fam);
#endif
fd_close_on_exec(FAMCONNECTION_GETFD(&sc->fam));
fdevent_setfd_cloexec(FAMCONNECTION_GETFD(&sc->fam));
fdevent_register(srv->ev, FAMCONNECTION_GETFD(&sc->fam), stat_cache_handle_fdevent, NULL);
fdevent_event_set(srv->ev, &(sc->fam_fcce_ndx), FAMCONNECTION_GETFD(&sc->fam), FDEVENT_IN);
}

Loading…
Cancel
Save