Skip to content

Commit

Permalink
Merge pull request #5 from linslin/master
Browse files Browse the repository at this point in the history
#4 Fixed PCTNL exeption for windows environment
  • Loading branch information
mcustiel committed Mar 4, 2017
2 parents b960cfe + 51cb3d0 commit bda5dce
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Extension/PhiremockProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PhiremockProcess
*/
public function start($ip, $port, $path, $logsPath, $debug)
{
$phiremockPath = is_file($path) ? $path : "{$path}/phiremock";
$phiremockPath = is_file($path) ? $path : "{$path}".DIRECTORY_SEPARATOR."phiremock";
if ($debug) {
echo 'Running ' . $this->getCommandPrefix()
. "{$phiremockPath} -i {$ip} -p {$port}"
Expand All @@ -73,8 +73,10 @@ public function start($ip, $port, $path, $logsPath, $debug)
*/
public function stop()
{
$this->process->signal(SIGTERM);
$this->process->stop(3, SIGKILL);
if (!$this->isWindows()) {
$this->process->signal(SIGTERM);
$this->process->stop(3, SIGKILL);
}
}

/**
Expand Down

0 comments on commit bda5dce

Please sign in to comment.