protected function reapChild(int $pid, int $status = null) {
        // One of ours?
        if (array_key_exists($pid, $this->children)) {

            $exited = pcntl_wexitstatus($status);
            if ($this->exitMode == 'worst-case') {
                if (abs($exited) > abs($this->exit)) {
                    $this->exit = $exited;
                }
            }

            $workerType = val($pid, $this->children);
            unset($this->children[$pid]);

            // Inform payload of reaped child
            $this->payloadExec('reapedWorker', [$pid, $workerType]);

            $fleetSize = $this->getFleetSize();
            $this->log(LogLevel::DEBUG, "[{pid}] Landing fleet '{$workerType}' with PID {$pid} ({$fleetSize} still in the air)");
        }
    }
protected function reapChild(int $pid, int $status = null) {
        // One of ours?
        if (array_key_exists($pid, $this->children)) {

            $exited = pcntl_wexitstatus($status);
            if ($this->exitMode == 'worst-case') {
                if (abs($exited) > abs($this->exit)) {
                    $this->exit = $exited;
                }
            }

            $workerType = val($pid, $this->children);
            unset($this->children[$pid]);

            // Inform payload of reaped child
            $this->payloadExec('reapedWorker', [$pid, $workerType]);

            $fleetSize = $this->getFleetSize();
            $this->log(LogLevel::DEBUG, "[{pid}] Landing fleet '{$workerType}' with PID {$pid} ({$fleetSize} still in the air)");
        }
    }
protected function reapChild ( int $ pid , int $ status = null ) { // One of ours? if ( array_key_exists ( $ pid , $ this -> children ) ) { $ exited = pcntl_wexitstatus ( $ status ) ; if ( $ this -> exitMode == 'worst-case' ) { if ( abs ( $ exited ) > abs ( $ this -> exit ) ) { $ this -> exit = $ exited ; } } $ workerType = val ( $ pid , $ this -> children ) ; unset ( $ this -> children [ $ pid ] ) ; // Inform payload of reaped child $ this -> payloadExec ( 'reapedWorker' , [ $ pid , $ workerType ] ) ; $ fleetSize = $ this -> getFleetSize ( ) ; $ this -> log ( LogLevel :: DEBUG , "[{pid}] Landing fleet '{$workerType}' with PID {$pid} ({$fleetSize} still in the air)" ) ; } }
Reap a fleet worker

@param int $pid
@param int $status
Reap a fleet worker