summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-06-19 23:25:39 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2017-07-15 22:42:15 -0400
commit685cab057e4e45cdf1203bc830d8fe3ed02ecf9f (patch)
treef499b5c77961c3eec056469249ba52624899bb00
parent31011adda99d938a28f78944f34bd85eb6701b6e (diff)
downloadlighttpd1.4-685cab057e4e45cdf1203bc830d8fe3ed02ecf9f.tar.gz
lighttpd1.4-685cab057e4e45cdf1203bc830d8fe3ed02ecf9f.zip
[core] rename fd_close_on_exec()
rename fd_close_on_exec() to fdevent_setfd_cloexec()
-rw-r--r--src/chunk.c2
-rw-r--r--src/fdevent.c2
-rw-r--r--src/fdevent.h1
-rw-r--r--src/fdevent_linux_sysepoll.c2
-rw-r--r--src/fdevent_solaris_devpoll.c2
-rw-r--r--src/mod_mysql_vhost.c2
-rw-r--r--src/mod_trigger_b4_dl.c2
-rw-r--r--src/mod_vhostdb_dbi.c2
-rw-r--r--src/mod_vhostdb_mysql.c2
-rw-r--r--src/stat_cache.c2
10 files changed, 9 insertions, 10 deletions
diff --git a/src/chunk.c b/src/chunk.c
index a4ee67b4..ffcb90a8 100644
--- a/src/chunk.c
+++ b/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;
diff --git a/src/fdevent.c b/src/fdevent.c
index eb658f90..c3aaf057 100644
--- a/src/fdevent.c
+++ b/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);
}
diff --git a/src/fdevent.h b/src/fdevent.h
index 7ca88229..19dd7563 100644
--- a/src/fdevent.h
+++ b/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);
diff --git a/src/fdevent_linux_sysepoll.c b/src/fdevent_linux_sysepoll.c
index c0e4384e..824d0d90 100644
--- a/src/fdevent_linux_sysepoll.c
+++ b/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);
diff --git a/src/fdevent_solaris_devpoll.c b/src/fdevent_solaris_devpoll.c
index 373bbbed..accb0f6b 100644
--- a/src/fdevent_solaris_devpoll.c
+++ b/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) {
diff --git a/src/mod_mysql_vhost.c b/src/mod_mysql_vhost.c
index c27bdd22..3102db52 100644
--- a/src/mod_mysql_vhost.c
+++ b/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);
}
}
diff --git a/src/mod_trigger_b4_dl.c b/src/mod_trigger_b4_dl.c
index b520c529..399116d8 100644
--- a/src/mod_trigger_b4_dl.c
+++ b/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)
diff --git a/src/mod_vhostdb_dbi.c b/src/mod_vhostdb_dbi.c
index 309d12c0..bf58ab69 100644
--- a/src/mod_vhostdb_dbi.c
+++ b/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;
}
}
diff --git a/src/mod_vhostdb_mysql.c b/src/mod_vhostdb_mysql.c
index 337e6f55..4b2877c5 100644
--- a/src/mod_vhostdb_mysql.c
+++ b/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;
diff --git a/src/stat_cache.c b/src/stat_cache.c
index 796050dd..f82e351f 100644
--- a/src/stat_cache.c
+++ b/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);
}