Repaired tests + refactored code for tests
This commit is contained in:
parent
b327ad8083
commit
9de4fb51d3
37 changed files with 409 additions and 1125 deletions
|
|
@ -30,14 +30,16 @@ class UnixProcessControl implements ProcessControlInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* Sends a signal using the "kill" command.
|
||||
*
|
||||
* @param int $pid
|
||||
* @param bool $forcefully
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function kill($pid, $forcefully = false)
|
||||
{
|
||||
exec(sprintf("kill -%d %d", $forcefully ? 9 : 15, $pid));
|
||||
$output = [];
|
||||
$result = 1;
|
||||
|
||||
exec(sprintf("kill -%d %d", $forcefully ? 9 : 15, $pid), $output, $result);
|
||||
|
||||
return !$result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue