public function setSignalHandler(int $signal, callable $closure = null){
        if (empty($closure)){
            return pcntl_signal($signal, array($this, 'sigHandler'));
        }
        return pcntl_signal($signal, $closure);
    }
public function setSignalHandler(int $signal, callable $closure = null){
        if (empty($closure)){
            return pcntl_signal($signal, array($this, 'sigHandler'));
        }
        return pcntl_signal($signal, $closure);
    }
public function setSignalHandler ( int $ signal , callable $ closure = null ) { if ( empty ( $ closure ) ) { return pcntl_signal ( $ signal , array ( $ this , 'sigHandler' ) ) ; } return pcntl_signal ( $ signal , $ closure ) ; }
Sets the signal to be handled by either the closure or the built in
signal handler.

@param int $signal
@param callable|null $closure

@return bool
Sets the signal to be handled by either the closure or the built in signal handler .