src/main/php/Executor.php
private function runCommand(string $command, string $redirect = '2>&1')
    {
        $pd = popen($command . ' ' . $redirect, 'r');
        if (false === $pd) {
            throw new \RuntimeException('Can not execute ' . $command);
        }

        return $pd;
    }
private function runCommand(string $command, string $redirect = '2>&1')
    {
        $pd = popen($command . ' ' . $redirect, 'r');
        if (false === $pd) {
            throw new \RuntimeException('Can not execute ' . $command);
        }

        return $pd;
    }
private function runCommand ( string $ command , string $ redirect = '2>&1' ) { $ pd = popen ( $ command . ' ' . $ redirect , 'r' ) ; if ( false === $ pd ) { throw new \ RuntimeException ( 'Can not execute ' . $ command ) ; } return $ pd ; }
runs given command and returns a handle to it

@param   string  $command
@param   string  $redirect  optional  how to redirect error output
@return  resource
@throws  \RuntimeException
runs given command and returns a handle to it