tony2001 Thu Jan 27 19:26:07 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src NEWS
/php-src/ext/posix posix.c
Log:
fix posix_getsid() & posix_getpgid()
/* looks like copy&paste error first introduced in PHP 3.0.10 (!) */
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.221&r2=1.1760.2.222&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.221 php-src/NEWS:1.1760.2.222
--- php-src/NEWS:1.1760.2.221 Thu Jan 27 11:38:05 2005
+++ php-src/NEWS Thu Jan 27 19:26:07 2005
@@ -11,6 +11,8 @@
- Fixed a bug in mysqli_stmt_execute() (type conversion with NULL values).
(Georg)
- Fixed segfault in mysqli_fetch_field_direct() when invalid field offset
is passed. (Tony)
+- Fixed posix_getsid() & posix_getpgid() to return sid & pgid instead
+ of true. (Tony)
- Fixed bug #31710 (Wrong return values for mysqli_autocommit/commit/rollback).
(Georg)
- Fixed bug #31705 (parse_url() does not recognize http://foo.com#bar). (Ilia)
http://cvs.php.net/diff.php/php-src/ext/posix/posix.c?r1=1.60&r2=1.60.2.1&ty=u
Index: php-src/ext/posix/posix.c
diff -u php-src/ext/posix/posix.c:1.60 php-src/ext/posix/posix.c:1.60.2.1
--- php-src/ext/posix/posix.c:1.60 Sun Apr 18 17:49:10 2004
+++ php-src/ext/posix/posix.c Thu Jan 27 19:26:07 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: posix.c,v 1.60 2004/04/18 21:49:10 iliaa Exp $ */
+/* $Id: posix.c,v 1.60.2.1 2005/01/28 00:26:07 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -131,7 +131,7 @@
static PHP_MINFO_FUNCTION(posix)
{
php_info_print_table_start();
- php_info_print_table_row(2, "Revision", "$Revision: 1.60 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.60.2.1 $");
php_info_print_table_end();
}
/* }}} */
@@ -371,7 +371,16 @@
#ifdef HAVE_GETPGID
PHP_FUNCTION(posix_getpgid)
{
- PHP_POSIX_SINGLE_ARG_FUNC(getpgid);
+ long val;
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &val) ==
FAILURE) {
+ return;
+ }
+
+ if ((val = getpgid(val)) < 0) {
+ POSIX_G(last_error) = errno;
+ RETURN_FALSE;
+ }
+ RETURN_LONG(val);
}
#endif
/* }}} */
@@ -381,7 +390,16 @@
#ifdef HAVE_GETSID
PHP_FUNCTION(posix_getsid)
{
- PHP_POSIX_SINGLE_ARG_FUNC(getsid);
+ long val;
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &val) ==
FAILURE) {
+ return;
+ }
+
+ if ((val = getsid(val)) < 0) {
+ POSIX_G(last_error) = errno;
+ RETURN_FALSE;
+ }
+ RETURN_LONG(val);
}
#endif
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php