jiangwu10057 / guardian_beast
swoole实现守护进程
dev-master
2020-03-10 07:00 UTC
Requires (Dev)
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: ^3.5
- swoole/ide-helper: ^4.4
- zircote/swagger-php: ^3.0
This package is auto-updated.
Last update: 2024-11-10 19:07:10 UTC
README
swoole 实现守护进程
实现参考“使用 swoole 实现进程的守护”系列文章 https://segmentfault.com/a/1190000019927916 https://segmentfault.com/a/1190000020038282 https://segmentfault.com/a/1190000020254600
安装
composer require jiangwu10057/guardian_beast:dev-master
使用方法
$configPath = dirname(__DIR__) . "/config/daemon.ini";
$daemonMany = new Daemon($configPath);
$daemonMany->run();
重载
kill -HUP pid
测试问题
1正在运行的设置为暂停会失败,还会产生孤儿进程 2主进程被kill了,守护的进程没有一起关闭