mirror of
https://github.com/php/php-src.git
synced 2024-10-02 23:36:16 +00:00
fe9ce624f6
- Fixed bug #47779 (Wrong value for SIG_UNBLOCK and SIG_SETMASK constants). Patch by: mbeccati at php.net
33 lines
893 B
PHP
33 lines
893 B
PHP
--TEST--
|
|
pcntl: SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('pcntl')) die('skip pcntl extension not available');
|
|
elseif (!extension_loaded('posix')) die('skip posix extension not available');
|
|
elseif (!function_exists('pcntl_sigwaitinfo') or !function_exists('pcntl_sigtimedwait')) die('skip required functionality is not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
pcntl_sigprocmask(SIG_BLOCK, array(SIGCHLD,SIGTERM), $old);
|
|
var_dump(count($old));
|
|
pcntl_sigprocmask(SIG_BLOCK, array(SIGINT), $old);
|
|
var_dump(count($old));
|
|
pcntl_sigprocmask(SIG_UNBLOCK, array(SIGINT), $old);
|
|
var_dump(count($old));
|
|
pcntl_sigprocmask(SIG_SETMASK, array(SIGINT), $old);
|
|
var_dump(count($old));
|
|
pcntl_sigprocmask(SIG_SETMASK, array(), $old);
|
|
var_dump(count($old));
|
|
pcntl_sigprocmask(SIG_SETMASK, array(), $old);
|
|
var_dump(count($old));
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(0)
|
|
int(2)
|
|
int(3)
|
|
int(2)
|
|
int(1)
|
|
int(0)
|