summaryrefslogtreecommitdiff
path: root/src/fdevent.h
Commit message (Collapse)AuthorAgeFilesLines
* [core] option to propagate TCP FIN to backend hostGlenn Strauss2018-08-121-3/+6
| | | | | | (experimental support for mod_sockproxy) "tcp-fin-propagate" = "enable" for each host in *.server backend defs
* [core] some header cleanupGlenn Strauss2018-04-081-1/+1
| | | | | | | | | 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] fix rare race condition from backends (fixes #2878)Glenn Strauss2018-03-181-2/+3
| | | | | | | | | | fix rare race condition from backends with server.stream-response-body=2 (thx abelbeck) x-ref: "fastcgi and stream-response-body=2 hangs on last chunk" https://redmine.lighttpd.net/issues/2878
* [core] discard from socket using recv MSG_TRUNCGlenn Strauss2017-12-111-0/+2
| | | | | | | | | | | | 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-0/+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-168/+8
|
* [core] perf: more efficient fdevent_sched_run()Glenn Strauss2017-10-211-1/+1
| | | | perf: more efficient fdevent_sched_run() over fds pending close
* [core] fdevent setsockopt() helper functionsGlenn Strauss2017-09-231-0/+3
| | | | | fdevent_set_tcp_nodelay() fdevent_set_so_reuseaddr()
* [core] SIGCHLD handle_waitpid hook for modulesGlenn Strauss2017-09-101-1/+3
| | | | | | | | | 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-3/+0
| | | | | (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-0/+4
| | | | | | 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/+1
| | | | fdevent_cycle_logger() re-opens log files before closing existing fd
* [core] fdevent_connect_status() shared codeGlenn Strauss2017-07-151-0/+2
|
* [core] rename fd_close_on_exec()Glenn Strauss2017-07-151-1/+0
| | | | rename fd_close_on_exec() to fdevent_setfd_cloexec()
* [core] consolidate fork()/execve() code (#1393)Glenn Strauss2017-07-151-0/+6
| | | | | | | | (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] no SOCK_CLOEXEC on Linux kernel < 2.6.27Glenn Strauss2017-04-151-1/+6
| | | | | | | | 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-0/+2
| | | | | 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/+1
| | | | (instead of providing #include "fdevent.h" in base.h)
* performance: use Linux extended syscalls and flagsGlenn Strauss2016-09-241-0/+6
| | | | | | | reduce syscalls on Linux using extended syscalls and flags, e.g. accept4(), pipe2(), O_CLOEXEC, SOCK_CLOEXEC, SOCK_NONBLOCK github: closes #2
* [core] fix crash if ready events on abandoned fd (fixes #2748)Glenn Strauss2016-08-241-0/+3
| | | | | | x-ref: "1.4.40/1.4.41 uploads to CGI may cause crash (SIGABRT)" https://redmine.lighttpd.net/issues/2748
* [core] check if client half-closed TCP if POLLHUP (#2743)Glenn Strauss2016-08-061-0/+3
| | | | | | | | | | | | Check if client half-closed TCP connection if POLLHUP is received. This more robustly handles if client called shutdown(fd, SHUT_WR). This patch reverts commit:ab05eb7c which should now be handled properly. (Time will tell.) x-ref: "1.4.40/41 mod_proxy, mod_scgi may trigger POLLHUP on *BSD,Darwin" https://redmine.lighttpd.net/issues/2743
* [core] add declarations to fdevent.h (#2373)Glenn Strauss2016-06-291-1/+6
| | | | | | | | (follow-up to 79bcfab0) x-ref: "FreeBSD build with libev broken" https://redmine.lighttpd.net/issues/2373
* fix errors detected by Coverity ScanGlenn Strauss2016-06-211-1/+1
| | | | | | | | fd leak in mod_dirlisting.c use after free in error condition in mod_proxy.c NULL pointer dereference in error message in chunk.c additional minor code changes made to quiet other coverity warnings
* [core] option to stream response body to client (fixes #949, #760, #1283, #1387)Glenn Strauss2016-06-191-0/+2
| | | | | | | | | | | | | | | | | | | | | Set server.stream-response-body = 1 or server.stream-response-body = 2 to have lighttpd stream response body to client as it arrives from the backend (CGI, FastCGI, SCGI, proxy). default: buffer entire response body before sending response to client. (This preserves existing behavior for now, but may in the future be changed to stream response to client, which is the behavior more commonly expected.) x-ref: "fastcgi, cgi, flush, php5 problem." https://redmine.lighttpd.net/issues/949 "Random crashing on FreeBSD 6.1" https://redmine.lighttpd.net/issues/760 "Memory usage increases when proxy+ssl+large file" https://redmine.lighttpd.net/issues/1283 "lighttpd+fastcgi memory problem" https://redmine.lighttpd.net/issues/1387
* [config] config options to stream request/response (#949, #376)Glenn Strauss2016-06-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows admin to configure if response is collected in entirety prior to sending data to client For compatibility with existing configs, default is existing behavior: buffer entire response prior to sending data to client The following are config options, though not all implemented yet // default: buffer entire request body before connecting to backend server.stream-request-body = 0 // stream request body to backend; buffer to temp files server.stream-request-body = 1 // stream request body to backend; minimal buffering might block upload server.stream-request-body = 2 // default: buffer entire response body before sending to client server.stream-request-body = 0 // stream response body to client; buffer to temp files server.stream-request-body = 1 // stream response body to client; minimal buffering might block backend server.stream-request-body = 2 x-ref: "fastcgi, cgi, flush, php5 problem." https://redmine.lighttpd.net/issues/949 "Reimplement upload (POST) handling to match apache/zeus/thttpd/boa functionality" https://redmine.lighttpd.net/issues/376
* always poll for client POLLHUP/POLLERR events (fixes #399)Glenn Strauss2016-04-181-2/+2
| | | | | | | | | | | | to detect client disconnect. Do so even when waiting on backend, and not polling for POLLRD or POLLWR on client connection. This reduces unnecessary load on backends when backends are slow to respond and client has given up waiting. x-ref: "https://redmine.lighttpd.net/issues/399" FastCGI performance on high load
* consistent inclusion of config.h at top of files (fixes #2073)Glenn Strauss2016-03-191-4/+1
| | | | | | From: Glenn Strauss <gstrauss@gluelogic.com> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3113 152afb58-edef-0310-8abb-c4023f1b3aa9
* [bitset] unused -> removeStefan Bühler2015-02-081-1/+0
| | | | | | From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2982 152afb58-edef-0310-8abb-c4023f1b3aa9
* force assertion: setting FD_CLOEXEC must work (if available)Stefan Bühler2014-02-161-0/+1
| | | | | | From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2952 152afb58-edef-0310-8abb-c4023f1b3aa9
* Move fdevent subsystem includes to implementation files to reduce conflicts ↵Stefan Bühler2011-12-251-9/+0
| | | | | | (fixes #2373) git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2823 152afb58-edef-0310-8abb-c4023f1b3aa9
* fdevent: add solaris eventports (fixes #2171)lighttpd-1.4.29Stefan Bühler2011-06-131-5/+10
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2796 152afb58-edef-0310-8abb-c4023f1b3aa9
* Rename fdevent_event_add to _set to reflect what the function does. Fix some ↵Stefan Bühler2010-08-171-3/+3
| | | | | | handlers. git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2765 152afb58-edef-0310-8abb-c4023f1b3aa9
* add libev fdevent handler: server.event-handler = "libev"Stefan Bühler2010-08-071-29/+17
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2754 152afb58-edef-0310-8abb-c4023f1b3aa9
* cleanup fdevent code, removed linux-rtsig handler, replaced some fprintf callsStefan Bühler2010-08-061-16/+8
| | | | | | | | * use log functions * convert flags * fix handler callback prototype git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2752 152afb58-edef-0310-8abb-c4023f1b3aa9
* Add <sys/types.h> before including event backendsStefan Bühler2009-10-111-0/+2
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2626 152afb58-edef-0310-8abb-c4023f1b3aa9
* Fix some compile problems from header inclusion reorder patchStefan Bühler2009-10-111-3/+6
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2625 152afb58-edef-0310-8abb-c4023f1b3aa9
* Fix header inclusion order, always include "config.h" before any system headerStefan Bühler2009-10-111-1/+2
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2624 152afb58-edef-0310-8abb-c4023f1b3aa9
* - white space cleanup part 2 this time 1.4 ;)Marcus Rückert2006-10-041-24/+24
| | | | | | i hope it helps with merging stuff back to 1.5 git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1371 152afb58-edef-0310-8abb-c4023f1b3aa9
* fdlist is not used, removed it (fixes inclusion into C++)Jan Kneschke2005-09-291-7/+2
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@749 152afb58-edef-0310-8abb-c4023f1b3aa9
* either remove include config.h or covered it in HAVE_CONFIG_HJan Kneschke2005-09-241-0/+2
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@733 152afb58-edef-0310-8abb-c4023f1b3aa9
* include <sys/select.h> if available (fixes #264, #275)Jan Kneschke2005-09-201-0/+3
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@720 152afb58-edef-0310-8abb-c4023f1b3aa9
* moved everything below trunk/ and added branches/ and tags/Jan Kneschke2005-02-201-0/+222
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@30 152afb58-edef-0310-8abb-c4023f1b3aa9