ko-process
ko-process copied to clipboard
Simple pcntl fork wrapper and process manager
``` $manager = new \Ko\ProcessManager(); for ($i = 0; $i < 10; $i++) { $manager->fork(function(\Ko\Process $p) use ($i) { echo 'Hello from ' . $p->getPid(); sleep(1); })->onSuccess(function() { echo 'end';...
Hi! I get this error: ``` [RuntimeException] Unable to create the semaphore (0) /htdocs/vendor/misterion/ko-process/src/Ko/Semaphore.php:81 #0: Ko\Semaphore->__construct(integer) /htdocs/vendor/misterion/ko-process/src/Ko/SharedMemory.php:90 #1: Ko\SharedMemory->__construct() /htdocs/vendor/misterion/ko-process/src/Ko/ProcessManager.php:196 #2: Ko\ProcessManager->createProcess(object) /htdocs/vendor/misterion/ko-process/src/Ko/ProcessManager.php:190 #3: Ko\ProcessManager->fork(object) ``` What could be the...
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. ```php $signalHandler...
I needed some additional parameter when starting thread. So I added it in Process class and fork and spawn method in ProcessManager class. I don' have enough time to PR,...
Make build-in max active child feature.