ko-process icon indicating copy to clipboard operation
ko-process copied to clipboard

Add DI to the ProcessManager::constructor

Open othercodes opened this issue 6 years ago • 0 comments

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);

othercodes avatar Apr 02 '18 10:04 othercodes