1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

sapi/fpm: setting backlog default to -1 for DragonFlyBSD.

like most of BSD, when negative the syscall sets it internally to
SOMAXCONN.

close GH-13077
This commit is contained in:
David Carlier
2024-01-05 18:53:49 +00:00
parent 08b9e8ae9c
commit b985a31b0a
2 changed files with 5 additions and 2 deletions

2
NEWS
View File

@@ -26,6 +26,8 @@ DOM:
FPM:
. Implement GH-12385 (flush headers without body when calling flush()).
(nielsdos)
. Added DragonFlyBSD system to the list which set FPM_BACKLOG_DEFAULT
to SOMAXCONN. (David Carlier)
FTP:
. Removed the deprecated inet_ntoa call support. (David Carlier)

View File

@@ -15,9 +15,10 @@
#include "fpm_worker_pool.h"
/*
On Linux, FreeBSD, OpenBSD and macOS, backlog negative values are truncated to SOMAXCONN
On Linux, FreeBSD, OpenBSD, DragonFlyBSD and macOS, backlog negative values are truncated to SOMAXCONN
*/
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__) || defined(__APPLE__)
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__) || \
defined(__DragonFly__) || defined(__APPLE__)
#define FPM_BACKLOG_DEFAULT -1
#else
#define FPM_BACKLOG_DEFAULT 511