protected function launchJob($jobID)
        {
            $pid = pcntl_fork();
            if ($pid == -1) {
                error_log('Could not launch new job, exiting');
                echo 'Could not launch new job, exiting';
                return false;
            } else if ($pid) {
                $this->currentJobs[$pid] = $jobID;
                if (isset($this->signalQueue[$pid])) {
                    $this->childSignalHandler(SIGCHLD, $pid, $this->signalQueue[$pid]);
                    unset($this->signalQueue[$pid]);
                }
            } else {
                $exitStatus = 0; //Error code if you need to or whatever
                exit($exitStatus);
            }
            return true;
        }
protected function launchJob($jobID)
        {
            $pid = pcntl_fork();
            if ($pid == -1) {
                error_log('Could not launch new job, exiting');
                echo 'Could not launch new job, exiting';
                return false;
            } else if ($pid) {
                $this->currentJobs[$pid] = $jobID;
                if (isset($this->signalQueue[$pid])) {
                    $this->childSignalHandler(SIGCHLD, $pid, $this->signalQueue[$pid]);
                    unset($this->signalQueue[$pid]);
                }
            } else {
                $exitStatus = 0; //Error code if you need to or whatever
                exit($exitStatus);
            }
            return true;
        }
protected function launchJob ( $ jobID ) { $ pid = pcntl_fork ( ) ; if ( $ pid == - 1 ) { error_log ( 'Could not launch new job, exiting' ) ; echo 'Could not launch new job, exiting' ; return false ; } else if ( $ pid ) { $ this -> currentJobs [ $ pid ] = $ jobID ; if ( isset ( $ this -> signalQueue [ $ pid ] ) ) { $ this -> childSignalHandler ( SIGCHLD , $ pid , $ this -> signalQueue [ $ pid ] ) ; unset ( $ this -> signalQueue [ $ pid ] ) ; } } else { $ exitStatus = 0 ; //Error code if you need to or whatever exit ( $ exitStatus ) ; } return true ; }
Launch a job from the job queue
Launch a job from the job queue