1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Fix windows-only constant issue

This commit is contained in:
Matthew Brown 2018-11-18 16:05:36 -05:00
parent b52f9cbcd2
commit 23ec0e037b

View File

@ -268,6 +268,10 @@ class Pool
$status = 0;
if ($process_lookup) {
/**
* @psalm-suppress UndefinedConstant - does not exist on windows
* @psalm-suppress MixedArgument
*/
posix_kill($child_pid, SIGALRM);
if (pcntl_waitpid($child_pid, $status) < 0) {
@ -280,6 +284,9 @@ class Pool
$return_code = pcntl_wexitstatus($status);
$term_sig = pcntl_wtermsig($status);
/**
* @psalm-suppress UndefinedConstant - does not exist on windows
*/
if ($term_sig !== SIGALRM) {
$this->did_have_error = true;
error_log("Child terminated with return code $return_code and signal $term_sig");