summaryrefslogtreecommitdiff
path: root/src/fdevent.c
Commit message (Collapse)AuthorAgeFilesLines
* [core] fdevent_dup_cloexec()Glenn Strauss2020-10-111-0/+10
|
* [core] fdevent_load_file_bytes()Glenn Strauss2020-10-111-1/+34
| | | | wrapper to load defined number of bytes from file at given offset
* [mod_deflate] deflate.cache-dir compressed cacheGlenn Strauss2020-08-021-1/+7
| | | | (achieves feature parity with mod_compress)
* [multiple] address coverity warningsGlenn Strauss2020-07-101-1/+1
|
* [core] fdevent_load_file() shared codeGlenn Strauss2020-07-081-0/+56
|
* [core] skip excess close() when FD_CLOEXEC definedGlenn Strauss2020-07-081-1/+1
| | | | | do not run through close() loop after fork() and before execve() when FD_CLOEXEC is defined
* [core] restart dead piped loggers every 64 secGlenn Strauss2020-07-081-1/+1
| | | | | (when piped logger exited too quickly after being restarted and when server.max-worker = 0)
* [core] isolate fdevent subsystemGlenn Strauss2020-07-081-48/+41
| | | | | | | fdevent.c no longer directly uses struct server *srv srv->srvconf.max_fds (if set) is used to set rlimits set max_conns in server.c after fdevent_init(), which sets srv->max_fds using srv->srvconf.max_fds (if set) as input hint
* [core] remove unused arg to fdevent_fcntl_set_nb*Glenn Strauss2020-07-081-9/+8
|
* [core] fdevent uses uint32_t instead of size_tGlenn Strauss2020-07-081-13/+12
|
* [multiple] prefer (connection *) to (srv *)Glenn Strauss2020-07-081-13/+10
| | | | | | | | convert all log_error_write() to log_error() and pass (log_error_st *) use con->errh in preference to srv->errh (even though currently same) avoid passing (server *) when previously used only for logging (errh)
* [core] use config_plugin_values_init()Glenn Strauss2020-07-081-11/+15
|
* [core] save errno before logging if execve() failsGlenn Strauss2020-01-261-1/+2
| | | | (fdevent_fork_execve())
* [core] fall back to accept() if accept4() EPERM (fixes #2998)Glenn Strauss2020-01-261-3/+12
| | | | | | | | | | | On some architectures, accept4() might result in EPERM depending on Linux kernel and/or glibc support for accept4() (thx alex-che) x-ref: "accept4 returns EPERM instead of ENOSYS on some platforms" https://redmine.lighttpd.net/issues/2998
* [core] retry on some fdevent set/del temporary errGlenn Strauss2019-09-071-12/+58
|
* [core] fdevent_mkstemp_append() (shared)Glenn Strauss2019-03-161-0/+22
|
* [core] pass conf.follow_symlink in more placesGlenn Strauss2019-03-101-14/+33
|
* [core] no SOCK_NONBLOCK on QNX 7.0Glenn Strauss2019-03-071-0/+16
| | | | | | | | | | | | QNX 7.0 has SOCK_CLOEXEC but not SOCK_NONBLOCK (thx supergaute) github: closes #98 x-ref: "Fix compile error when system has SOCK_CLOEXEC but not SOCK_NONBLOCK" https://github.com/lighttpd/lighttpd1.4/pull/98
* [core] pass (fdnode *) for registered fdevent fdGlenn Strauss2019-03-071-25/+12
| | | | | inline fdevent_fdnode_interest() avoid array lookup for (fdnode *) for various ops
* [core] perf: pass (fdnode *) to epoll and kqueueGlenn Strauss2019-03-071-0/+1
|
* [core] isolate fdevent processingGlenn Strauss2019-03-071-2/+9
|
* [core] remove fde_ndx member outside fdeventsGlenn Strauss2019-03-071-8/+4
| | | | (isolated to fdevent framework internals)
* [core] some fdevent code streamliningGlenn Strauss2019-03-071-126/+90
| | | | isolate fde_ndx to fdevent framework internals
* [core] map FDEVENT_* to OS system event frameworksGlenn Strauss2019-02-171-1/+3
| | | | (avoid need to translate event flags between OS and lighttpd FDEVENT_*)
* [core] dispatch events from within event frameworkGlenn Strauss2019-02-131-16/+0
| | | | | | event framework now calls interface to dispatch events rather than itself implementing multiple interfaces for fdevent_process() to be able to dispatch events generically.
* [core] fdevent_process()Glenn Strauss2019-02-041-16/+13
| | | | process fdevents in fdevent.c
* [core] check if SOCK_NONBLOCK is ignored (fixes #2883)Glenn Strauss2018-08-051-5/+21
| | | | | | x-ref: "fdevent_init should check if SOCK_NONBLOCK works" https://redmine.lighttpd.net/issues/2883
* [core] some header cleanupGlenn Strauss2018-04-081-0/+9
| | | | | | | | | provide standard types in first.h instead of base.h provide lighttpd types in base_decls.h instead of settings.h reduce headers exposed by headers for core data structures do not expose <pcre.h> or <stdlib.h> in headers move stat_cache_entry to stat_cache.h reduce use of "server.h" and "base.h" in headers
* [core] fdevent_accept_listenfd() nonblock cloexecGlenn Strauss2018-03-251-4/+20
| | | | | | | | fdevent_accept_listenfd() now always returns fd O_NONBLOCK O_CLOEXEC for consistency, rather than setting elsewhere in connection_accepted() Handle older Linux 2.6 kernels which might have accept4() in glibc, but return ENOSYS, as accept4() was not added until Linux kernel 2.6.28.
* [core] non-blocking write() to piped loggersGlenn Strauss2018-01-021-0/+2
| | | | | If pipe fills and would block, then discard remaining write. Do not block lighttpd if the logger blocks, such as if disk fills up.
* [core] discard from socket using recv MSG_TRUNCGlenn Strauss2017-12-111-0/+22
| | | | | | | | | | | | discard from socket using recv MSG_TRUNC on Linux TCP SOCK_STREAM socket Currently, lighttpd supports only TCP SOCK_STREAM. If UDP SOCK_DGRAM were to be supported in the future, then socket type will need to be stored so that MSG_TRUNC is used appropriately for the desired effect. To find out socket type on arbitrary socket fd: getsockopt(..., SOL_SOCKET, SO_TYPE, ...) but better to store it with each listening socket.
* [core] support POLLRDHUP, where available (#2743)Glenn Strauss2017-11-191-1/+1
| | | | | | | | x-ref: "mod_cgi, lighty not killing CGI if connection in the other end is closed" https://redmine.lighttpd.net/boards/2/topics/5962 "1.4.40/41 mod_proxy, mod_scgi may trigger POLLHUP on *BSD,Darwin" https://redmine.lighttpd.net/issues/2743
* [core] isolate backend fdevent handler defsGlenn Strauss2017-11-031-2/+145
|
* [core] perf: more efficient fdevent_sched_run()Glenn Strauss2017-10-211-14/+30
| | | | perf: more efficient fdevent_sched_run() over fds pending close
* [core] fdevent setsockopt() helper functionsGlenn Strauss2017-09-231-0/+12
| | | | | fdevent_set_tcp_nodelay() fdevent_set_so_reuseaddr()
* [core] SIGCHLD handle_waitpid hook for modulesGlenn Strauss2017-09-101-12/+26
| | | | | | | | | centralize most waitpid() handling in core server, with hooks for modules to be informed of pid and status when a process exits. This enables faster discovery (and restart) of exited processes, and also allows for lighttpd to manage backend processes in the parent (master) process when server.max-worker > 0.
* [core] remove fdevent fcntl_set hookGlenn Strauss2017-07-291-6/+3
| | | | | (could have been removed in 2010 with commit 38f2d1dd which removed fdevent_linux_rtsig.c)
* [core] restart piped loggers if they exit (fixes #1393)Glenn Strauss2017-07-231-16/+130
| | | | | | x-ref: "access log pipe writer should restart child process if it exits" https://redmine.lighttpd.net/issues/1393
* [core] fdevent_cycle_logger()Glenn Strauss2017-07-231-0/+10
| | | | fdevent_cycle_logger() re-opens log files before closing existing fd
* [core] fdevent_connect_status() shared codeGlenn Strauss2017-07-151-0/+9
|
* [core] reduce exposure of unistd.h, other includesGlenn Strauss2017-07-151-0/+1
| | | | reduce exposure of unistd.h, and some other include cleanup
* [core] rename fd_close_on_exec()Glenn Strauss2017-07-151-1/+1
| | | | rename fd_close_on_exec() to fdevent_setfd_cloexec()
* [core] consolidate fork()/execve() code (#1393)Glenn Strauss2017-07-151-0/+193
| | | | | | | | (refactoring work to address issue #1393) x-ref: "access log pipe writer should restart child process if it exits" https://redmine.lighttpd.net/issues/1393
* [core] fix compiler warnings on Mac OS XGlenn Strauss2017-06-131-0/+2
| | | | (thx wardw)
* [mod_proxy] fix typo identified by coverityGlenn Strauss2017-05-151-4/+4
| | | | | fix mod_proxy.c typo identified by coverity silence some warnings checking return values of fcntl() in fdevent.c
* [core] no SOCK_CLOEXEC on Linux kernel < 2.6.27Glenn Strauss2017-04-151-12/+56
| | | | | | | | Linux kernels < 2.6.27 (old!) might return EINVAL if SOCK_CLOEXEC used x-ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529929 http://www.linksysinfo.org/index.php?threads/lighttpd-no-longer-starts-toastman-1-28-0510-7.73132/
* [core] collect ioctl FIONREAD codeGlenn Strauss2017-03-281-1/+23
| | | | | include <sys/ioctl.h> in files which use ioctl() instead of exposing header in local header "sys-socket.h"
* [core] include "fdevent.h" where neededGlenn Strauss2017-03-281-1/+3
| | | | (instead of providing #include "fdevent.h" in base.h)
* [core] remove some unused header includesGlenn Strauss2017-03-281-2/+0
| | | | remove exposure of stdio.h in buffer.h for print_backtrace(), now static
* [core] default server.max-fds=4096 if unspecified (#2789)Glenn Strauss2017-02-281-1/+1
| | | | | | x-ref: "lighttpd cores on AIX when nofiles is unlimited" https://redmine.lighttpd.net/issues/2789