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

Events uv cant handle stop signall #942

Closed webrobot1 closed 11 months ago

webrobot1 commented 12 months ago

Hello again

Uv is Libuv library. it cant handle SIGQUIT what is gracefull stop - https://docs.libuv.org/en/v1.x/signal.html

webrobot1 commented 12 months ago

image

webrobot1 commented 12 months ago

And as i see it cant handle SIGINT (2) too

webrobot1 commented 12 months ago

may be it is possible set as a constant at Worker.php which signal number master will send to child process ? At this reason i can extend Worker...but now i need rewrite all stopAll() function

webrobot1 commented 12 months ago

workerman version 4.*

walkor commented 12 months ago

it cant handle SIGQUIT what is gracefull stop - https://docs.libuv.org/en/v1.x/signal.html And as i see it cant handle SIGINT (2) too

Sorry, I couldn’t find the issue you mentioned in https://docs.libuv.org/en/v1.x/signal.html.

webrobot1 commented 12 months ago

Sorry, I couldn’t find the issue you mentioned

graccefull stop signal oа workerman is SIGQUIT but it not accapted by Libuv (UV) and a lot of another signals

webrobot1 commented 12 months ago

when worker forks events (like UV) check the signals in workerman

walkor commented 11 months ago

I think if UV cannot handle certain signals, you should make compatibility changes in Events/Uv.php instead of modifying the Worker.php file.

webrobot1 commented 11 months ago

I think if UV cannot handle certain signals, you should make compatibility changes in Events/Uv.php instead of modifying the Worker.php file.

it is imposible bacause worker process is running on event loop only this loop can wakeup process on signall

And if master process will sent signal what Events/Uv.php cant handle - it cant be handle

webrobot1 commented 11 months ago

If Events/Uv.php cant handle some of basic signals (number before 10+-) maybe another events library cant too

walkor commented 11 months ago

If UV cannot receive signals such as SIGINT or SIQUIT, I believe this is a bug in UV, and Workerman will not be compatible with it.

webrobot1 commented 11 months ago

ok, thank for feedback