src/Process/handler/SignalHandler.php
private function spawnRpqInstance($withTest = false)
    {
        $command = sprintf(
            '%s queue -c %s',
            $_SERVER["SCRIPT_FILENAME"],
            $this->args['configFile']
        );

        if ($withTest) {
            $command = "exec {$command} -t";
        } else {
            $command = "exec {$command} > /dev/null 2>&1 &";
        }

        // Spawns a detached process
        $process = new Process($command);
        $process->disableOutput();
        $process->start();

        if ($withTest) {
            $process->wait();
            $code = $process->getExitCode();

            return $code === 0;
        }

        return yield $process->getPid();
    }
private function spawnRpqInstance($withTest = false)
    {
        $command = sprintf(
            '%s queue -c %s',
            $_SERVER["SCRIPT_FILENAME"],
            $this->args['configFile']
        );

        if ($withTest) {
            $command = "exec {$command} -t";
        } else {
            $command = "exec {$command} > /dev/null 2>&1 &";
        }

        // Spawns a detached process
        $process = new Process($command);
        $process->disableOutput();
        $process->start();

        if ($withTest) {
            $process->wait();
            $code = $process->getExitCode();

            return $code === 0;
        }

        return yield $process->getPid();
    }
private function spawnRpqInstance ( $ withTest = false ) { $ command = sprintf ( '%s queue -c %s' , $ _SERVER [ "SCRIPT_FILENAME" ] , $ this -> args [ 'configFile' ] ) ; if ( $ withTest ) { $ command = "exec {$command} -t" ; } else { $ command = "exec {$command} > /dev/null 2>&1 &" ; } // Spawns a detached process $ process = new Process ( $ command ) ; $ process -> disableOutput ( ) ; $ process -> start ( ) ; if ( $ withTest ) { $ process -> wait ( ) ; $ code = $ process -> getExitCode ( ) ; return $ code === 0 ; } return yield $ process -> getPid ( ) ; }
Executes a self test by running `./rpq queue -t -c <config_file>.
This method is blocking until the self test finishes, and the
self test will be run within a separate process space.

@return mixed
Executes a self test by running . / rpq queue - t - c <config_file > . This method is blocking until the self test finishes and the self test will be run within a separate process space .