tony2001 Tue Mar 22 10:09:21 2005 EDT Modified files: (Branch: PHP_5_0) /php-src NEWS /php-src/sapi/cli php_cli.c Log: MFH: fix #28803 (enabled debug causes bailout errors with CLI on AIX because of fflush() called on already closed filedescriptor) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.296&r2=1.1760.2.297&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.296 php-src/NEWS:1.1760.2.297 --- php-src/NEWS:1.1760.2.296 Tue Mar 22 05:18:42 2005 +++ php-src/NEWS Tue Mar 22 10:09:18 2005 @@ -150,6 +150,8 @@ - Fixed bug #30106 (SOAP cannot not parse 'ref' element. Causes Uncaught SoapFault exception). (Dmitry) - Fixed bug #29989 (type re_registers redefined in oniguruma.h). (Moriyoshi) +- Fixed bug #28803 (enabled debug causes bailout errors with CLI on AIX + because of fflush() called on already closed filedescriptor). (Tony) - Fixed bug #29767 (Weird behaviour of __set($name, $value)). (Dmitry) - Fixed bug #29733 (printf() handles repeated placeholders wrong). (bugs dot php dot net at bluetwanger dot de, Ilia) http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.113.2.1&r2=1.113.2.2&ty=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.113.2.1 php-src/sapi/cli/php_cli.c:1.113.2.2 --- php-src/sapi/cli/php_cli.c:1.113.2.1 Mon Nov 15 09:08:33 2004 +++ php-src/sapi/cli/php_cli.c Tue Mar 22 10:09:20 2005 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli.c,v 1.113.2.1 2004/11/15 14:08:33 tony2001 Exp $ */ +/* $Id: php_cli.c,v 1.113.2.2 2005/03/22 15:09:20 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -220,7 +220,10 @@ static void sapi_cli_flush(void *server_context) { - if (fflush(stdout)==EOF) { + /* Ignore EBADF here, it's caused by the fact that STDIN/STDOUT/STDERR streams + * are/could be closed before fflush() is called. + */ + if (fflush(stdout)==EOF && errno!=EBADF) { #ifndef PHP_CLI_WIN32_NO_CONSOLE php_handle_aborted_connection(); #endif
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php