Reworked the DaemonCommand.
* Accepts options for PID and log file. * Uses posix_kill whenever available. * Checks that the daemon actually started or stopped. * Try to terminate then kill the daemon. * Uses the logger or output instead of "echo". Added a ProcessControl interface and implementations. Closed #908
This commit is contained in:
parent
15b6917f68
commit
4edefee761
11 changed files with 572 additions and 45 deletions
17
Tests/PHPCI/ProcessControl/PosixProcessControlTest.php
Normal file
17
Tests/PHPCI/ProcessControl/PosixProcessControlTest.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
namespace Tests\PHPCI\ProcessControl;
|
||||
|
||||
use PHPCI\ProcessControl\PosixProcessControl;
|
||||
|
||||
class PosixProcessControlTest extends UnixProcessControlTest
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new PosixProcessControl();
|
||||
}
|
||||
|
||||
public function testIsAvailable()
|
||||
{
|
||||
$this->assertEquals(function_exists('posix_kill'), PosixProcessControl::isAvailable());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue