History log of /lighttpd1.4/src/fdevent.c (Results 1 – 25 of 103)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: lighttpd-1.4.69
# fbf42d79 30-Jan-2023 Glenn Strauss <[email protected]>

[core] move headers to help isolate fdevent layer

move headers to help isolate fdevent layer from layers above


# 0787b103 23-Jan-2023 Glenn Strauss <[email protected]>

[core] iOS does not provide netinet/tcp_fsm.h

x-ref:
https://redmine.lighttpd.net/boards/3/topics/10842


# dcdc0956 19-Jan-2023 Glenn Strauss <[email protected]>

[core] reset SIGUSR1 to SIG_DFL before execve()

reset SIGUSR1 to SIG_DFL in fdevent_fork_execve() before execve()
(in case SIGUSR1 had been set to SIG_IGN for server.max-worker > 0)


# 48033deb 19-Jan-2023 Glenn Strauss <[email protected]>

[core] remove cygwin O_NOFOLLOW workaround

cygwin O_NOFOLLOW fixed in cygwin 3.4.5-1

x-ref:
[ANNOUNCEMENT] cygwin 3.4.5-1
https://cygwin.com/pipermail/cygwin/2023-January/252900.html
Fix an

[core] remove cygwin O_NOFOLLOW workaround

cygwin O_NOFOLLOW fixed in cygwin 3.4.5-1

x-ref:
[ANNOUNCEMENT] cygwin 3.4.5-1
https://cygwin.com/pipermail/cygwin/2023-January/252900.html
Fix an uninitialized variable having weird side-effects in path handling.
https://cygwin.com/pipermail/cygwin/2022-December/252734.html

show more ...


# 22467311 10-Jan-2023 Glenn Strauss <[email protected]>

[core] avoid accept4() on ARM unless detected

accept4() was added in Linux x86 in kernel 2.6.28
accept4() was added in Linux ARM in kernel 2.6.36

Depending on the build environment, this patch may

[core] avoid accept4() on ARM unless detected

accept4() was added in Linux x86 in kernel 2.6.28
accept4() was added in Linux ARM in kernel 2.6.36

Depending on the build environment, this patch may result in lighttpd
using accept() on some ARM systems where accept4() is available, but
should avoid the prior situation on ancient systems where accept4()
fails at runtime due to libc support present but kernel support missing.

x-ref:
"Not need for new syscall"
https://lwn.net/Articles/789961/
"accept4 returns EPERM instead of ENOSYS on some platforms"
https://redmine.lighttpd.net/issues/2998
"cross-compilation for blackfin processor"
https://redmine.lighttpd.net/boards/2/topics/10772

show more ...


Revision tags: lighttpd-1.4.68
# ae540898 02-Jan-2023 Glenn Strauss <[email protected]>

[core] temporarily disable O_NOFOLLOW on Cygwin

broken in current cygwin; fixed in cygwin test

x-ref:
https://www.mail-archive.com/[email protected]/msg172400.html


Revision tags: lighttpd-1.4.67
# 6524a2fb 12-Aug-2022 Brad Smith <[email protected]>

Update comment about TCP_INFO on OpenBSD

github: closes #113


Revision tags: lighttpd-1.4.66, lighttpd-1.4.65, lighttpd-1.4.64
# 3d0f6489 04-Jan-2022 Glenn Strauss <[email protected]>

[core] /dev/null is a symlink on Illumos (fixes #3132)

(thx devnexen)

also fix IPv6 detection on Illumos in CMake

x-ref:
"Solaris little nit build fix and startup fix"
https://redmine.lighttpd

[core] /dev/null is a symlink on Illumos (fixes #3132)

(thx devnexen)

also fix IPv6 detection on Illumos in CMake

x-ref:
"Solaris little nit build fix and startup fix"
https://redmine.lighttpd.net/issues/3132

show more ...


Revision tags: lighttpd-1.4.63, lighttpd-1.4.62
# 0f51b372 02-Nov-2021 Glenn Strauss <[email protected]>

[core] fdevent_fdnode.c separate from fdevent.c


# ec529177 01-Nov-2021 Glenn Strauss <[email protected]>

[core] fdevent_impl.c separate from fdevent.c


# b7a8fd46 01-Nov-2021 Glenn Strauss <[email protected]>

[core] fdevent_socket_nb_cloexec_init()

fdevent_socket_nb_cloexec_init() separate from fdevent_init()


Revision tags: lighttpd-1.4.61, lighttpd-1.4.60
# e0d7eafd 03-Oct-2021 Glenn Strauss <[email protected]>

[core] adjust indent for clarity


# 37209081 02-Oct-2021 Glenn Strauss <[email protected]>

[core] portability tweaks for various platforms/cc


# 434fab49 02-Oct-2021 Glenn Strauss <[email protected]>

[core] quiet coverity warnings


Revision tags: lighttpd-1.4.59, lighttpd-1.4.58, lighttpd-1.4.57, lighttpd-1.4.56
# f37847b1 24-Nov-2020 Glenn Strauss <[email protected]>

[core] _WIN32 impl of fdevent_mkostemp()


# cc2fcd3e 24-Nov-2020 Glenn Strauss <[email protected]>

[multiple] _WIN32 fdevent_pipe_cloexec()

Note: Under _WIN32, serious limitation in Windows APIs:
select() and WSAPoll() operate only on sockets (not pipes)
(directly affects mod_cgi; not current

[multiple] _WIN32 fdevent_pipe_cloexec()

Note: Under _WIN32, serious limitation in Windows APIs:
select() and WSAPoll() operate only on sockets (not pipes)
(directly affects mod_cgi; not currently handled)

show more ...


# 9f62f1b1 21-Sep-2021 Glenn Strauss <[email protected]>

[multiple] fdevent_mkostemp()

fdevent_mkostemp() with flags arg so that caller can pass O_APPEND

renamed from fdevent_mkstemp_append(), previously always O_APPEND


# b38817b6 17-Sep-2021 Glenn Strauss <[email protected]>

[core] mark attr malloc, returns nonnull

mark some core code with attributes malloc, returns nonnull


# 243510db 11-Sep-2021 Glenn Strauss <[email protected]>

[core] fdlog.[ch]; fdevent_*_logger_* -> fdlog_*

code move and rename fdevent_*_logger_*() to fdlog_*()


# 9a2404ce 13-Jul-2021 Glenn Strauss <[email protected]>

[core] quiet compiler warnings

cast away signedness warning in request_check_hostname()
mod_gnutls https_add_ssl_client_entries crts allocated if crt_size != 0
(which is already checked earlier in

[core] quiet compiler warnings

cast away signedness warning in request_check_hostname()
mod_gnutls https_add_ssl_client_entries crts allocated if crt_size != 0
(which is already checked earlier in routine)

report from FaceBook Infer static analysis tool (https://fbinfer.com/)
- quiet dead store warnings
- check return != NULL from allocation funcs

show more ...


# 309c1693 12-Jul-2021 Glenn Strauss <[email protected]>

[multiple] Y2038 32-bit signed time_t mitigations

Most OS platforms have already provided solutions to
Y2038 32-bit signed time_t 5 - 10 years ago (or more!)
Notable exceptions are Linux i686 and Fr

[multiple] Y2038 32-bit signed time_t mitigations

Most OS platforms have already provided solutions to
Y2038 32-bit signed time_t 5 - 10 years ago (or more!)
Notable exceptions are Linux i686 and FreeBSD i386.

Since 32-bit systems tend to be embedded systems,
and since many distros take years to pick up new software,
this commit aims to provide Y2038 mitigations for lighttpd
running on 32-bit systems with Y2038-unsafe 32-bit signed time_t

* Y2038: lighttpd 1.4.60 and later report Y2038 safety
$ lighttpd -V
+ Y2038 support # Y2038-SAFE
$ lighttpd -V
- Y2038 support (unsafe 32-bit signed time_t) # Y2038-UNSAFE

* Y2038: general platform info
* Y2038-SAFE: lighttpd 64-bit builds on platforms using 64-bit time_t
- all major 64-bit platforms (known to this author) use 64-bit time_t
* Y2038-SAFE: lighttpd 32-bit builds on platforms using 64-bit time_t
- Linux x32 ABI (different from i686)
- FreeBSD all 32-bit and 64-bit architectures *except* 32-bit i386
- NetBSD 6.0 (released Oct 2012) all 32-bit and 64-bit architectures
- OpenBSD 5.5 (released May 2014) all 32-bit and 64-bit architectures
- Microsoft Windows XP and Visual Studio 2005 (? unsure ?)
Another reference suggests Visual Studio 2015 defaults to 64-bit time_t
- MacOS 10.15 Catalina (released 2019) drops support for 32-bit apps
* Y2038-SAFE: lighttpd 32-bit builds on platforms using 32-bit unsigned time_t
- e.g. OpenVMS (unknown if lighttpd builds on this platform)
* Y2038-UNSAFE: lighttpd 32-bit builds on platforms using 32-bit signed time_t
- Linux 32-bit (including i686)
- glibc 32-bit library support not yet available for 64-bit time_t
- https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
- Linux kernel 5.6 on 32-bit platforms does support 64-bit time_t
https://itsubuntu.com/linux-kernel-5-6-to-fix-the-year-2038-issue-unix-y2k/
- https://www.gnu.org/software/libc/manual/html_node/64_002dbit-time-symbol-handling.html
"Note: at this point, 64-bit time support in dual-time
configurations is work-in-progress, so for these
configurations, the public API only makes the 32-bit time
support available. In a later change, the public API will
allow user code to choose the time size for a given
compilation unit."
- compiling with -D_TIME_BITS=64 currently has no effect
- glibc recent (Jul 2021) mailing list discussion
- https://public-inbox.org/bug-gnulib/[email protected]/T/
- FreeBSD i386
- DragonFlyBSD 32-bit

* Y2038 mitigations attempted on Y2038-UNSAFE platforms (32-bit signed time_t)
* lighttpd prefers system monotonic clock instead of realtime clock
in places where realtime clock is not required
* lighttpd treats negative time_t values as after 19 Jan 2038 03:14:07 GMT
* (lighttpd presumes that lighttpd will not encounter dates before 1970
during normal operation.)
* lighttpd casts struct stat st.st_mtime (and st.st_*time) through uint64_t
to convert negative timestamps for comparisions with 64-bit timestamps
(treating negative timestamp values as after 19 Jan 2038 03:14:07 GMT)
* lighttpd provides unix_time64_t (int64_t) and
* lighttpd provides struct unix_timespec64 (unix_timespec64_t)
(struct timespec equivalent using unix_time64_t tv_sec member)
* lighttpd provides gmtime64_r() and localtime64_r() wrappers
for platforms 32-bit platforms using 32-bit time_t and
lighttpd temporarily shifts the year in order to use
gmtime_r() and localtime_r() (or gmtime() and localtime())
from standard libraries, before readjusting year and passing
struct tm to formatting functions such as strftime()
* lighttpd provides TIME64_CAST() macro to cast signed 32-bit time_t to
unsigned 32-bit and then to unix_time64_t

* Note: while lighttpd tries handle times past 19 Jan 2038 03:14:07 GMT
on 32-bit platforms using 32-bit signed time_t, underlying libraries and
underlying filesystems might not behave properly after 32-bit signed time_t
overflows (19 Jan 2038 03:14:08 GMT). If a given 32-bit OS does not work
properly using negative time_t values, then lighttpd likely will not work
properly on that system.

* Other references and blogs
- https://en.wikipedia.org/wiki/Year_2038_problem
- https://en.wikipedia.org/wiki/Time_formatting_and_storage_bugs
- http://www.lieberbiber.de/2017/03/14/a-look-at-the-year-20362038-problems-and-time-proofness-in-various-systems/

show more ...


# 27b8f1d0 24-May-2021 Glenn Strauss <[email protected]>

[core] compare entire "/bin/sh" "-c" after execve

compare entire "/bin/sh" "-c" strings after execve if execve fails


# 08c03cd4 22-May-2021 Glenn Strauss <[email protected]>

[multiple] rename safe_memclear() -> ck_memzero()


# 6836a32c 18-May-2021 Glenn Strauss <[email protected]>

[core] omit fdevent select() code if poll() avail

omit fdevent select() code if poll() avail
translate server.event-handler = "select" to "poll" when poll available


# 2d6c511d 15-May-2021 Pavel Gulchuk <[email protected]>

[core] fix kill workers and shutdown by signal

github: closes #105


12345