In FreeBSD the mode SWOOLE_PROCESS not working, i am testing in 12.3-RELEASE and 13.1-RELEASE. This a simple code to test: <?php $http = new Swoole\Http\Server("127.0.0.1", 9501, SWOOLE_PROCESS); $http->on('request', function ($request, $response) { $response->end("<h1>Hello Swoole. #".rand(1000, 9999)."</h1>"); }); $http->start(); I init this code in a terminal and call with cURL in another, but requisition is locked and dont return "Hello Swoole XyXy". If modify mode to SWOOLE_BASE call with cURL return correct. I tested versions of Swoole 4.8.10, 4.8.11, 4.8.12 and 5.0.0, with ports and pkg, but any recent version dont work in FreeBSD with mode SWOOLE_PROCESS. Currently i runing with sucess with mode SWOOLE_PROCESS, but in an old version Swoole in FreeBSD 12.2-STABLE, Swoole 4.8.9 and PHP 7.3.18.
(In reply to Ricardo Sette from comment #0) *correction* Currently i runing with sucess with mode SWOOLE_PROCESS, but in an old version Swoole in FreeBSD 12.1-STABLE, Swoole 4.4.18 and PHP 7.3.8.
The bug started in version 4.8.0 as presented at https://github.com/swoole/swoole-src/issues/4838#issuecomment-1256569191
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8205a77b96b7a543a8306b1a5f37ac6ae1ef1103 commit 8205a77b96b7a543a8306b1a5f37ac6ae1ef1103 Author: Vanilla I. Shu <vanilla@FreeBSD.org> AuthorDate: 2022-10-02 03:43:40 +0000 Commit: Vanilla I. Shu <vanilla@FreeBSD.org> CommitDate: 2022-10-02 03:44:46 +0000 devel/pecl-swoole: update to 4.8.12, also fix error with SWOOLE_PROCESS. PR: 266555 Reported by: Ricardo Sette <ricardohfsp at gmail.com> devel/pecl-swoole/Makefile | 2 +- devel/pecl-swoole/distinfo | 6 ++-- .../files/patch-ext-src_php__swoole__private.h | 4 +-- .../files/patch-src_server_manager.cc (new) | 14 +++++++++ .../files/patch-src_server_master.cc (new) | 36 ++++++++++++++++++++++ 5 files changed, 56 insertions(+), 6 deletions(-)
Hi: I just update pecl-swoole to 4.8.12, and add some official patches for SWOOLE_PROCESS, thanks.