ko-process
ko-process copied to clipboard
Add DI to the ProcessManager::constructor
Dependency injection in the Process manager, so the user can pre-configure the \Ko\SignalHandler allowing custom behavior with signals in daemonized executions, maybe to reload configuration or custom operations.
$signalHandler = new \Ko\SignalHandler();
$signalHandler->registerHandler(SIGHUP, function () {
// do something on reload
});
$manager = new \Ko\ProcessManager($signalHandler);