diff --git a/src/PnctlEmitter.php b/src/PnctlEmitter.php index 86e0f16..932d3d9 100644 --- a/src/PnctlEmitter.php +++ b/src/PnctlEmitter.php @@ -22,7 +22,10 @@ public function __construct(LoopInterface $loop, $interval = 0.1) */ public function on($signo, callable $listener) { - pcntl_signal($signo, array($this, 'emit')); + pcntl_signal($signo, function($signo) { + $this->emit($signo, array($signo)); + }); + parent::on($signo, $listener); }