Skip to content

Commit 7b301e3

Browse files
authored
QA - pcntl_signal - error when handler is int and not SIG_DFL or SIG_IGN
Closes GH-9001.
1 parent 492f9c6 commit 7b301e3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ext/pcntl/tests/pcntl_signal_002.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
pcntl_signal() - If handler is an int value different than SIG_DFL or SIG_IGN
3+
--EXTENSIONS--
4+
pcntl
5+
--FILE--
6+
<?php
7+
8+
try {
9+
pcntl_signal(SIGTERM, -1);
10+
} catch (Error $error) {
11+
echo $error->getMessage();
12+
}
13+
14+
?>
15+
--EXPECT--
16+
pcntl_signal(): Argument #2 ($handler) must be either SIG_DFL or SIG_IGN when an integer value is given

0 commit comments

Comments
 (0)