public function signalToEvent($signal) {

        if ( $this->pid == ProcessTools::getPid() ) {

            $signame = $this->signals->signame($signal);

            $this->logger->debug("Received $signame ($signal) signal, firing associated event(s)");

            $this->events->emit(new PosixEvent($signal, $this));
            $this->events->emit(new PosixEvent($signame, $this));

        }

        return $this;

    }
public function signalToEvent($signal) {

        if ( $this->pid == ProcessTools::getPid() ) {

            $signame = $this->signals->signame($signal);

            $this->logger->debug("Received $signame ($signal) signal, firing associated event(s)");

            $this->events->emit(new PosixEvent($signal, $this));
            $this->events->emit(new PosixEvent($signame, $this));

        }

        return $this;

    }
public function signalToEvent ( $ signal ) { if ( $ this -> pid == ProcessTools :: getPid ( ) ) { $ signame = $ this -> signals -> signame ( $ signal ) ; $ this -> logger -> debug ( "Received $signame ($signal) signal, firing associated event(s)" ) ; $ this -> events -> emit ( new PosixEvent ( $ signal , $ this ) ) ; $ this -> events -> emit ( new PosixEvent ( $ signame , $ this ) ) ; } return $ this ; }
The generic signal handler.

It transforms a signal into framework catchable event.

@param int $signal
@return self
The generic signal handler .