From 77b1147e3fcb27636b7a33e5811c60492c726e78 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Wed, 25 Mar 2009 22:49:43 +0000 Subject: [PATCH] - Fixed bug #47779 (Wrong value for SIG_UNBLOCK and SIG_SETMASK constants). Patch by: mbeccati at php.net --- ext/pcntl/pcntl.c | 4 ++-- ext/pcntl/tests/003.phpt | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 ext/pcntl/tests/003.phpt diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index e48e330e39..723dd809dc 100755 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -264,8 +264,8 @@ void php_register_signal_constants(INIT_FUNC_ARGS) /* {{{ "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 /* }}} */ diff --git a/ext/pcntl/tests/003.phpt b/ext/pcntl/tests/003.phpt new file mode 100644 index 0000000000..012277d255 --- /dev/null +++ b/ext/pcntl/tests/003.phpt @@ -0,0 +1,32 @@ +--TEST-- +pcntl: SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK +--SKIPIF-- + +--FILE-- + +--EXPECT-- +int(0) +int(2) +int(3) +int(2) +int(1) +int(0) -- 2.50.1