cvs: php-src /ext/posix posix.c

From: Date: Fri, 28 Jan 2005 00:27:48 +0000
Subject: cvs: php-src /ext/posix posix.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-30187@lists.php.net to get a copy of this message
tony2001 Thu Jan 27 19:27:48 2005 EDT Modified files: /php-src/ext/posix posix.c Log: MFB: fix posix_getsid() & posix_getpgid() http://cvs.php.net/diff.php/php-src/ext/posix/posix.c?r1=1.62&r2=1.63&ty=u Index: php-src/ext/posix/posix.c diff -u php-src/ext/posix/posix.c:1.62 php-src/ext/posix/posix.c:1.63 --- php-src/ext/posix/posix.c:1.62 Fri Jan 7 12:38:03 2005 +++ php-src/ext/posix/posix.c Thu Jan 27 19:27:48 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: posix.c,v 1.62 2005/01/07 17:38:03 magnus Exp $ */ +/* $Id: posix.c,v 1.63 2005/01/28 00:27:48 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -133,7 +133,7 @@ static PHP_MINFO_FUNCTION(posix) { php_info_print_table_start(); - php_info_print_table_row(2, "Revision", "$Revision: 1.62 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.63 $"); php_info_print_table_end(); } /* }}} */ @@ -377,7 +377,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 /* }}} */ @@ -387,7 +396,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 /* }}} */

« previous php.cvs (#30187) next »