- Fixed bug #47779 (Wrong value for SIG_UNBLOCK and SIG_SETMASK constants).
Patch by: mbeccati at php.net
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 200?, PHP 5.3.0 RC 2
+- Fixed bug #47779 (Wrong value for SIG_UNBLOCK and SIG_SETMASK constants).
+ (Matteo)
- Fixed bug #47699 (autoload and late static binding). (Dmitry)
- Fixed bug #47038 (Memory leak in include). (Dmitry)
-- Fixed bug #44409 (PDO::FETCH_SERIALIZE calls __construct()).
- (matteo at beccati dot com)
-- Fixed bug #42362 - (HTTP status codes 204 and 304 should not be gzipped).
+- Fixed bug #44409 (PDO::FETCH_SERIALIZE calls __construct()). (Matteo)
+- Fixed bug #42362 (HTTP status codes 204 and 304 should not be gzipped).
(Scott, Edward Z. Yang)
/* {{{ "how" argument for sigprocmask */
#ifdef HAVE_SIGPROCMASK
REGISTER_LONG_CONSTANT("SIG_BLOCK", SIG_BLOCK, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("SIG_UNBLOCK", SIG_BLOCK, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("SIG_SETMASK", SIG_BLOCK, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SIG_UNBLOCK", SIG_UNBLOCK, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SIG_SETMASK", SIG_SETMASK, CONST_CS | CONST_PERSISTENT);
#endif
/* }}} */
--- /dev/null
+--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)