EvSignal->signum is null

Issue #17 resolved
Aaron Piotrowski
created an issue

In the PHP 7 version, the signum property of the EvSignal object passed to the watcher callback is null instead of the signal number.

<?php

$loop = new \EvLoop();

$signal = $loop->signal(SIGUSR1, function (\EvSignal $signal) {
    printf("\$signal->signum = %s\n", var_export($signal->signum, true));
});

$timer1 = $loop->timer(0.1, 0, function () {
    posix_kill(getmypid(), SIGUSR1);
});

$timer2 = $loop->timer(0.2, 0, function () use ($loop) {
    $loop->stop();
});

$loop->run();

// Result:
// $signal->signum = NULL

Comments (1)

  1. Log in to comment