felipe          Wed Mar 25 22:49:43 2009 UTC

  Added files:                 
    /php-src/ext/pcntl/tests    003.phpt 

  Modified files:              
    /php-src/ext/pcntl  pcntl.c 
  Log:
  - Fixed bug #47779 (Wrong value for SIG_UNBLOCK and SIG_SETMASK constants). 
    Patch by: mbeccati at php.net
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcntl/pcntl.c?r1=1.73&r2=1.74&diff_format=u
Index: php-src/ext/pcntl/pcntl.c
diff -u php-src/ext/pcntl/pcntl.c:1.73 php-src/ext/pcntl/pcntl.c:1.74
--- php-src/ext/pcntl/pcntl.c:1.73      Tue Mar 10 23:39:27 2009
+++ php-src/ext/pcntl/pcntl.c   Wed Mar 25 22:49:42 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: pcntl.c,v 1.73 2009/03/10 23:39:27 helly Exp $ */
+/* $Id: pcntl.c,v 1.74 2009/03/25 22:49:42 felipe Exp $ */
 
 #define PCNTL_DEBUG 0
 
@@ -264,8 +264,8 @@
        /* {{{ "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
        /* }}} */
 

http://cvs.php.net/viewvc.cgi/php-src/ext/pcntl/tests/003.phpt?view=markup&rev=1.1
Index: php-src/ext/pcntl/tests/003.phpt
+++ php-src/ext/pcntl/tests/003.phpt
--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)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to