version 1.1, 2012/02/21 23:47:59
|
version 1.1.1.3, 2013/07/22 01:31:57
|
Line 2
|
Line 2
|
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| PHP Version 5 | |
| PHP Version 5 | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Copyright (c) 1997-2012 The PHP Group | | | Copyright (c) 1997-2013 The PHP Group | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| This source file is subject to version 3.01 of the PHP license, | |
| This source file is subject to version 3.01 of the PHP license, | |
| that is bundled with this package in the file LICENSE, and is | |
| that is bundled with this package in the file LICENSE, and is | |
Line 760 PHP_FUNCTION(pcntl_exec)
|
Line 760 PHP_FUNCTION(pcntl_exec)
|
} |
} |
|
|
if (ZEND_NUM_ARGS() > 1) { |
if (ZEND_NUM_ARGS() > 1) { |
/* Build argumnent list */ | /* Build argument list */ |
args_hash = HASH_OF(args); |
args_hash = HASH_OF(args); |
argc = zend_hash_num_elements(args_hash); |
argc = zend_hash_num_elements(args_hash); |
|
|
Line 816 PHP_FUNCTION(pcntl_exec)
|
Line 816 PHP_FUNCTION(pcntl_exec)
|
|
|
if (execve(path, argv, envp) == -1) { |
if (execve(path, argv, envp) == -1) { |
PCNTL_G(last_error) = errno; |
PCNTL_G(last_error) = errno; |
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error has occured: (errno %d) %s", errno, strerror(errno)); | php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error has occurred: (errno %d) %s", errno, strerror(errno)); |
} |
} |
|
|
/* Cleanup */ |
/* Cleanup */ |
Line 826 PHP_FUNCTION(pcntl_exec)
|
Line 826 PHP_FUNCTION(pcntl_exec)
|
|
|
if (execv(path, argv) == -1) { |
if (execv(path, argv) == -1) { |
PCNTL_G(last_error) = errno; |
PCNTL_G(last_error) = errno; |
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error has occured: (errno %d) %s", errno, strerror(errno)); | php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error has occurred: (errno %d) %s", errno, strerror(errno)); |
} |
} |
} |
} |
|
|
Line 849 PHP_FUNCTION(pcntl_signal)
|
Line 849 PHP_FUNCTION(pcntl_signal)
|
return; |
return; |
} |
} |
|
|
|
if (signo < 1 || signo > 32) { |
|
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid signal"); |
|
RETURN_FALSE; |
|
} |
|
|
if (!PCNTL_G(spares)) { |
if (!PCNTL_G(spares)) { |
/* since calling malloc() from within a signal handler is not portable, |
/* since calling malloc() from within a signal handler is not portable, |
* pre-allocate a few records for recording signals */ |
* pre-allocate a few records for recording signals */ |
Line 864 PHP_FUNCTION(pcntl_signal)
|
Line 869 PHP_FUNCTION(pcntl_signal)
|
|
|
/* Special long value case for SIG_DFL and SIG_IGN */ |
/* Special long value case for SIG_DFL and SIG_IGN */ |
if (Z_TYPE_P(handle)==IS_LONG) { |
if (Z_TYPE_P(handle)==IS_LONG) { |
if (Z_LVAL_P(handle)!= (long) SIG_DFL && Z_LVAL_P(handle) != (long) SIG_IGN) { | if (Z_LVAL_P(handle) != (long) SIG_DFL && Z_LVAL_P(handle) != (long) SIG_IGN) { |
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value for handle argument specified"); |
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value for handle argument specified"); |
|
RETURN_FALSE; |
} |
} |
if (php_signal(signo, (Sigfunc *) Z_LVAL_P(handle), (int) restart_syscalls) == SIG_ERR) { |
if (php_signal(signo, (Sigfunc *) Z_LVAL_P(handle), (int) restart_syscalls) == SIG_ERR) { |
PCNTL_G(last_error) = errno; |
PCNTL_G(last_error) = errno; |
Line 1121 PHP_FUNCTION(pcntl_getpriority)
|
Line 1127 PHP_FUNCTION(pcntl_getpriority)
|
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error %d: Invalid identifier flag", errno); |
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error %d: Invalid identifier flag", errno); |
break; |
break; |
default: |
default: |
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown error %d has occured", errno); | php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown error %d has occurred", errno); |
break; |
break; |
} |
} |
RETURN_FALSE; |
RETURN_FALSE; |
Line 1161 PHP_FUNCTION(pcntl_setpriority)
|
Line 1167 PHP_FUNCTION(pcntl_setpriority)
|
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error %d: Only a super user may attempt to increase the process priority", errno); |
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error %d: Only a super user may attempt to increase the process priority", errno); |
break; |
break; |
default: |
default: |
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown error %d has occured", errno); | php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown error %d has occurred", errno); |
break; |
break; |
} |
} |
RETURN_FALSE; |
RETURN_FALSE; |