tool help you to manage your process, based on swoole
- add
kyozhou/php-service-manager
to require filed in your composer.json file - composer install
php yourscript.php start|stop|restart|debug
(it will create a "yourscript.pid" file in current dic)
<?php
require 'vendor/autoload.php'; //this will autoload php-service-manager
while(true) {
file_put_contents("/tmp/logger.log", rand(1, 9) . ',', FILE_APPEND);
sleep(1);
}
author email: kyozhou@sina.com