Skip to content

Commit da3a807

Browse files
committed
Increased test compatibility
The test expects no masked signals at the beginning, but when run as part of a Bamboo build, SIGQUIT is already masked and the test fails.
1 parent 454d297 commit da3a807

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ext/pcntl/tests/003.phpt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ pcntl: SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK
99
--FILE--
1010
<?php
1111

12+
// Clear mask
13+
pcntl_sigprocmask(SIG_SETMASK, array(), $prev);
14+
1215
pcntl_sigprocmask(SIG_BLOCK, array(SIGCHLD,SIGTERM), $old);
1316
var_dump(count($old));
1417
pcntl_sigprocmask(SIG_BLOCK, array(SIGINT), $old);
@@ -19,7 +22,9 @@ pcntl_sigprocmask(SIG_SETMASK, array(SIGINT), $old);
1922
var_dump(count($old));
2023
pcntl_sigprocmask(SIG_SETMASK, array(), $old);
2124
var_dump(count($old));
22-
pcntl_sigprocmask(SIG_SETMASK, array(), $old);
25+
26+
// Restore previous mask
27+
pcntl_sigprocmask(SIG_SETMASK, $prev, $old);
2328
var_dump(count($old));
2429

2530
?>

0 commit comments

Comments
 (0)