summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-07-29 00:30:53 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2017-07-29 00:36:48 -0400
commitd4a37a3bbb8276f3c683ff62b714f0225491b317 (patch)
tree620c657a555767f3eba9605ea127b47b76f766b0
parentc23f8fdd6f148e0548926bcd92ec7759f52f872c (diff)
downloadlighttpd1.4-d4a37a3bbb8276f3c683ff62b714f0225491b317.tar.gz
lighttpd1.4-d4a37a3bbb8276f3c683ff62b714f0225491b317.zip
[core] remove fdevent fcntl_set hook
(could have been removed in 2010 with commit 38f2d1dd which removed fdevent_linux_rtsig.c)
-rw-r--r--src/fdevent.c9
-rw-r--r--src/fdevent.h3
-rw-r--r--src/gw_backend.c6
3 files changed, 3 insertions, 15 deletions
diff --git a/src/fdevent.c b/src/fdevent.c
index 28b07234..36590a73 100644
--- a/src/fdevent.c
+++ b/src/fdevent.c
@@ -301,15 +301,12 @@ void fdevent_clrfd_cloexec(int fd) {
#endif
}
-int fdevent_fcntl_set(fdevents *ev, int fd) {
- return ((ev) && (ev->fcntl_set)) ? ev->fcntl_set(ev, fd) : 0;
-}
-
int fdevent_fcntl_set_nb(fdevents *ev, int fd) {
- if ((ev) && (ev->fcntl_set)) return ev->fcntl_set(ev, fd);
+ UNUSED(ev);
#ifdef O_NONBLOCK
return fcntl(fd, F_SETFL, O_NONBLOCK | O_RDWR);
#else
+ UNUSED(fd);
return 0;
#endif
}
@@ -322,7 +319,7 @@ int fdevent_fcntl_set_nb_cloexec(fdevents *ev, int fd) {
int fdevent_fcntl_set_nb_cloexec_sock(fdevents *ev, int fd) {
#if defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK)
if (use_sock_cloexec)
- return ((ev) && (ev->fcntl_set)) ? ev->fcntl_set(ev, fd) : 0;
+ return 0;
#endif
return fdevent_fcntl_set_nb_cloexec(ev, fd);
}
diff --git a/src/fdevent.h b/src/fdevent.h
index 4caef9d9..138c5414 100644
--- a/src/fdevent.h
+++ b/src/fdevent.h
@@ -178,8 +178,6 @@ typedef struct fdevents {
int (*event_next_fdndx)(struct fdevents *ev, int ndx);
int (*poll)(struct fdevents *ev, int timeout_ms);
-
- int (*fcntl_set)(struct fdevents *ev, int fd);
} fdevents;
fdevents *fdevent_init(struct server *srv, size_t maxfds, int type);
@@ -208,7 +206,6 @@ void fdevent_sched_run(struct server *srv, fdevents *ev);
void fdevent_setfd_cloexec(int fd);
void fdevent_clrfd_cloexec(int fd);
-int fdevent_fcntl_set(fdevents *ev, int fd);
int fdevent_fcntl_set_nb(fdevents *ev, int fd);
int fdevent_fcntl_set_nb_cloexec(fdevents *ev, int fd);
int fdevent_fcntl_set_nb_cloexec_sock(fdevents *ev, int fd);
diff --git a/src/gw_backend.c b/src/gw_backend.c
index 7b67f9a5..52d5147c 100644
--- a/src/gw_backend.c
+++ b/src/gw_backend.c
@@ -1722,12 +1722,6 @@ static handler_t gw_write_request(server *srv, gw_handler_ctx *hctx) {
fdevent_register(srv->ev, hctx->fd, gw_handle_fdevent, hctx);
- if (-1 == fdevent_fcntl_set(srv->ev, hctx->fd)) {
- log_error_write(srv, __FILE__, __LINE__, "ss",
- "fcntl failed:", strerror(errno));
- return HANDLER_ERROR;
- }
-
if (hctx->proc->is_local) {
hctx->pid = hctx->proc->pid;
}