| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
wrapper to load defined number of bytes from file at given offset
|
|
|
|
| |
(achieves feature parity with mod_compress)
|
| |
|
| |
|
|
|
|
|
| |
do not run through close() loop after fork() and before execve()
when FD_CLOEXEC is defined
|
|
|
|
|
| |
(when piped logger exited too quickly after being restarted
and when server.max-worker = 0)
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
| |
(fdevent_fork_execve())
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
inline fdevent_fdnode_interest()
avoid array lookup for (fdnode *) for various ops
|
| |
|
| |
|
|
|
|
| |
(isolated to fdevent framework internals)
|
|
|
|
| |
isolate fde_ndx to fdevent framework internals
|
|
|
|
| |
(avoid need to translate event flags between OS and lighttpd FDEVENT_*)
|
|
|
|
|
|
| |
event framework now calls interface to dispatch events rather than
itself implementing multiple interfaces for fdevent_process() to
be able to dispatch events generically.
|
|
|
|
| |
process fdevents in fdevent.c
|
|
|
|
|
|
| |
x-ref:
"fdevent_init should check if SOCK_NONBLOCK works"
https://redmine.lighttpd.net/issues/2883
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
If pipe fills and would block, then discard remaining write.
Do not block lighttpd if the logger blocks, such as if disk fills up.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
perf: more efficient fdevent_sched_run() over fds pending close
|
|
|
|
|
| |
fdevent_set_tcp_nodelay()
fdevent_set_so_reuseaddr()
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
(could have been removed in 2010 with commit 38f2d1dd
which removed fdevent_linux_rtsig.c)
|
|
|
|
|
|
| |
x-ref:
"access log pipe writer should restart child process if it exits"
https://redmine.lighttpd.net/issues/1393
|
|
|
|
| |
fdevent_cycle_logger() re-opens log files before closing existing fd
|
| |
|
|
|
|
| |
reduce exposure of unistd.h, and some other include cleanup
|
|
|
|
| |
rename fd_close_on_exec() to fdevent_setfd_cloexec()
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
| |
(thx wardw)
|
|
|
|
|
| |
fix mod_proxy.c typo identified by coverity
silence some warnings checking return values of fcntl() in fdevent.c
|
|
|
|
|
|
|
|
| |
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/
|
|
|
|
|
| |
include <sys/ioctl.h> in files which use ioctl()
instead of exposing header in local header "sys-socket.h"
|
|
|
|
| |
(instead of providing #include "fdevent.h" in base.h)
|
|
|
|
| |
remove exposure of stdio.h in buffer.h for print_backtrace(), now static
|
|
|
|
|
|
| |
x-ref:
"lighttpd cores on AIX when nofiles is unlimited"
https://redmine.lighttpd.net/issues/2789
|