protected function createProcess(string $cmd, string $cwd): Process
    {
        $process = $this->processFactory->getProcess(
            $cmd,
            $cwd,
            $this->discoverSystemEnvironment()
        );
        $process->setTimeout(null);

        return $process;
    }