private function endProcess()
    {
        $arguments = $this->resolveProcessArgs();
        $name = sha1(serialize($arguments));
        if ($this->background->hasProcess($name)) {
            $this->background->getProcess($name)->stop();
            $this->background->removeProcess($name);
        }
    }