public function removeProcessByName($name)
    {
        foreach ($this->processes as $key => $process) {
            if ($process->name() == $name) {
                if ($process->isRunning()) {
                    throw new \RuntimeException("can not remove a running process");
                }
                unset($this->processes[$key]);
            }
        }
    }