Skip to content

Commit

Permalink
QA - pcntl_signal - error when handler is int and not SIG_DFL or SIG_IGN
Browse files Browse the repository at this point in the history
Closes GH-9001.
  • Loading branch information
juan-morales committed Jul 14, 2022
1 parent 492f9c6 commit 7b301e3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ext/pcntl/tests/pcntl_signal_002.phpt
@@ -0,0 +1,16 @@
--TEST--
pcntl_signal() - If handler is an int value different than SIG_DFL or SIG_IGN
--EXTENSIONS--
pcntl
--FILE--
<?php

try {
pcntl_signal(SIGTERM, -1);
} catch (Error $error) {
echo $error->getMessage();
}

?>
--EXPECT--
pcntl_signal(): Argument #2 ($handler) must be either SIG_DFL or SIG_IGN when an integer value is given

0 comments on commit 7b301e3

Please sign in to comment.