walkor / workerman

An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.
http://www.workerman.net
MIT License
11.03k stars 2.25k forks source link

Run Workerman in daemon mode with Windows #1017

Closed joanhey closed 4 months ago

joanhey commented 4 months ago

Running the Testman functional tests in GH actions with Win OS, stop indefinitely after run it. Like if it was without daemon mode, and awaiting to finish.

If we use Symfony/Proccess work without problems.

Is it Workerman working in daemon mode in Windows? Or we do anything bad ?

Windows

https://github.com/joanhey/TestMan/actions/runs/8039629986/job/21956826330#step:6:12 image

Ubuntu

https://github.com/joanhey/TestMan/actions/runs/8039629986/job/21956826073#step:6:12 image

Also work OK with Mac OS. Workflow: https://github.com/joanhey/TestMan/actions/runs/8039629986/workflow

~Another curios fact, is that in windows install Workerman v4.0.0 and not v4.1.15 !!! Edit: It seems that is for the constrains in the composer.json. We'll need to think a solution for win.~ image Edit: It seems than in windows is not working correctly the Caret Version Range (^), but work OK with Tilde Version Range (~). But still fail the daemon mode with windows, with workerman v4.1.15.

PD: It'll be good to show at start in the info panel, in which OS is running. Now we show Workerman version, PHP version and event lib using.

walkor commented 4 months ago

Workerman does not support daemon mode on Windows. Due to the lack of support for the posix pcntl module in PHP on Windows, many features cannot be implemented. I suggest temporarily not running unit tests on Windows, and only running them on Linux and Mac OS.

joanhey commented 4 months ago

I'll use a php process. Thank you!