src/Process/Signals.php
public function append($signal, Closure $callback)
    {
        if (empty($this->listeners)) {
            declare(ticks = 1);
        }

        $this->listeners[$signal] = $callback;

        pcntl_signal($signal, [$this, "executeListener"]);

        return $this;
    }
public function append($signal, Closure $callback)
    {
        if (empty($this->listeners)) {
            declare(ticks = 1);
        }

        $this->listeners[$signal] = $callback;

        pcntl_signal($signal, [$this, "executeListener"]);

        return $this;
    }
public function append ( $ signal , Closure $ callback ) { if ( empty ( $ this -> listeners ) ) { declare ( ticks = 1 ) ; } $ this -> listeners [ $ signal ] = $ callback ; pcntl_signal ( $ signal , [ $ this , "executeListener" ] ) ; return $ this ; }
Add signal listener

@param int      $signal   signal id
@param \Closure $callback function to run when the signal is
received

@return $this
Add signal listener