pajoye Thu, 04 Feb 2010 09:13:14 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=294505
Log:
- Ensure that stderr output are not buffered, portability for tests
Changed paths:
_U php/php-src/branches/PHP_5_3_2/
U php/php-src/branches/PHP_5_3_2/Zend/zend_alloc.c
U php/php-src/branches/PHP_5_3_2/Zend/zend_execute.c
U php/php-src/branches/PHP_5_3_2/Zend/zend_execute_API.c
U php/php-src/branches/PHP_5_3_2/Zend/zend_extensions.c
_U php/php-src/branches/PHP_5_3_2/ext/tidy/tests/
U php/php-src/branches/PHP_5_3_2/main/output.c
_U
php/php-src/branches/PHP_5_3_2/tests/security/open_basedir_parse_ini_file.phpt
Property changes on: php/php-src/branches/PHP_5_3_2
___________________________________________________________________
Modified: svn:mergeinfo
- /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682-292683,292693,292716,292719,292762,292765,292771,292777,292823,293051,293075,293114,293126,293131,293144,293146,293152,293176,293180,293216,293235,293253,293268,293341,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293762,293768,293804,293862,293897,293901-293902,293906,293965,293974,294040
/php/php-src/trunk:284726
+ /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682-292683,292693,292716,292719,292762,292765,292771,292777,292823,293051,293075,293114,293126,293131,293144,293146,293152,293176,293180,293216,293235,293253,293268,293341,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293762,293768,293804,293862,293897,293901-293902,293906,293965,293974,293985,294040
/php/php-src/trunk:284726
Modified: php/php-src/branches/PHP_5_3_2/Zend/zend_alloc.c
===================================================================
--- php/php-src/branches/PHP_5_3_2/Zend/zend_alloc.c 2010-02-04 09:11:00 UTC (rev 294504)
+++ php/php-src/branches/PHP_5_3_2/Zend/zend_alloc.c 2010-02-04 09:13:14 UTC (rev 294505)
@@ -84,6 +84,10 @@
static void zend_mm_panic(const char *message)
{
fprintf(stderr, "%s\n", message);
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
#if ZEND_DEBUG && defined(HAVE_KILL) && defined(HAVE_GETPID)
kill(getpid(), SIGSEGV);
#endif
@@ -1031,11 +1035,19 @@
if (zend_mm_low_bit(block_size) != zend_mm_high_bit(block_size)) {
fprintf(stderr, "'block_size' must be a power of two\n");
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
exit(255);
}
storage = handlers->init(params);
if (!storage) {
fprintf(stderr, "Cannot initialize zend_mm storage [%s]\n", handlers->name);
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
exit(255);
}
storage->handlers = handlers;
@@ -1118,9 +1130,17 @@
if (!mem_handlers[i].name) {
fprintf(stderr, "Wrong or unsupported zend_mm storage type '%s'\n", mem_type);
fprintf(stderr, " supported types:\n");
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
for (i = 0; mem_handlers[i].name; i++) {
fprintf(stderr, " '%s'\n", mem_handlers[i].name);
}
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
exit(255);
}
}
@@ -1131,9 +1151,17 @@
seg_size = zend_atoi(tmp, 0);
if (zend_mm_low_bit(seg_size) != zend_mm_high_bit(seg_size)) {
fprintf(stderr, "ZEND_MM_SEG_SIZE must be a power of two\n");
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
exit(255);
} else if (seg_size < ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE) {
fprintf(stderr, "ZEND_MM_SEG_SIZE is too small\n");
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
exit(255);
}
} else {
@@ -1672,6 +1700,10 @@
size);
fprintf(stderr, " in %s on line %d\n", error_filename, error_lineno);
}
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
} zend_end_try();
} else {
heap->overflow = 2;
Modified: php/php-src/branches/PHP_5_3_2/Zend/zend_execute.c
===================================================================
--- php/php-src/branches/PHP_5_3_2/Zend/zend_execute.c 2010-02-04 09:11:00 UTC (rev 294504)
+++ php/php-src/branches/PHP_5_3_2/Zend/zend_execute.c 2010-02-04 09:13:14 UTC (rev 294505)
@@ -1232,6 +1232,10 @@
{
if (Z_TYPE_PP(pz) > 9) {
fprintf(stderr, "Warning! %x has invalid type!\n", *pz);
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
} else if (Z_TYPE_PP(pz) == IS_ARRAY) {
zend_hash_apply(Z_ARRVAL_PP(pz), (apply_func_t) zend_check_symbol TSRMLS_CC);
} else if (Z_TYPE_PP(pz) == IS_OBJECT) {
Modified: php/php-src/branches/PHP_5_3_2/Zend/zend_execute_API.c
===================================================================
--- php/php-src/branches/PHP_5_3_2/Zend/zend_execute_API.c 2010-02-04 09:11:00 UTC (rev 294504)
+++ php/php-src/branches/PHP_5_3_2/Zend/zend_execute_API.c 2010-02-04 09:13:14 UTC (rev 294505)
@@ -74,6 +74,10 @@
get_active_function_name(TSRMLS_C),
zend_get_executed_filename(TSRMLS_C),
zend_get_executed_lineno(TSRMLS_C));
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
}
if (original_sigsegv_handler!=zend_handle_sigsegv) {
original_sigsegv_handler(dummy);
Modified: php/php-src/branches/PHP_5_3_2/Zend/zend_extensions.c
===================================================================
--- php/php-src/branches/PHP_5_3_2/Zend/zend_extensions.c 2010-02-04 09:11:00 UTC (rev 294504)
+++ php/php-src/branches/PHP_5_3_2/Zend/zend_extensions.c 2010-02-04 09:13:14 UTC (rev 294505)
@@ -35,6 +35,10 @@
if (!handle) {
#ifndef ZEND_WIN32
fprintf(stderr, "Failed loading %s: %s\n", path, DL_ERROR());
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
#else
fprintf(stderr, "Failed loading %s\n", path);
#endif
@@ -51,6 +55,10 @@
}
if (!extension_version_info || !new_extension) {
fprintf(stderr, "%s doesn't appear to be a valid Zend extension\n", path);
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
DL_UNLOAD(handle);
return FAILURE;
}
@@ -64,6 +72,10 @@
new_extension->name,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO);
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
DL_UNLOAD(handle);
return FAILURE;
} else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) {
@@ -76,6 +88,10 @@
new_extension->author,
new_extension->URL,
new_extension->name);
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
DL_UNLOAD(handle);
return FAILURE;
}
@@ -83,6 +99,10 @@
(!new_extension->build_id_check || new_extension->build_id_check(ZEND_EXTENSION_BUILD_ID) != SUCCESS)) {
fprintf(stderr, "Cannot load %s - it was built with configuration %s, whereas running engine is %s\n",
new_extension->name, extension_version_info->build_id, ZEND_EXTENSION_BUILD_ID);
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
DL_UNLOAD(handle);
return FAILURE;
}
@@ -90,6 +110,10 @@
return zend_register_extension(new_extension, handle);
#else
fprintf(stderr, "Extensions are not supported on this platform.\n");
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
return FAILURE;
#endif
}
Property changes on: php/php-src/branches/PHP_5_3_2/ext/tidy/tests
___________________________________________________________________
Modified: svn:mergeinfo
- /php/php-src/branches/PHP_5_3/ext/tidy/tests:292562,292566,292571,292574,292635,292716,292719,292765,293146,293152,293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293762,293768,293804,293862,293897,293901-293902,293906,293965,294040
/php/php-src/trunk/ext/tidy/tests:284726,287798-287941
+ /php/php-src/branches/PHP_5_3/ext/tidy/tests:292562,292566,292571,292574,292635,292716,292719,292765,293146,293152,293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293762,293768,293804,293862,293897,293901-293902,293906,293965,293985,294040
/php/php-src/trunk/ext/tidy/tests:284726,287798-287941
Modified: php/php-src/branches/PHP_5_3_2/main/output.c
===================================================================
--- php/php-src/branches/PHP_5_3_2/main/output.c 2010-02-04 09:11:00 UTC (rev 294504)
+++ php/php-src/branches/PHP_5_3_2/main/output.c 2010-02-04 09:13:14 UTC (rev 294505)
@@ -50,6 +50,10 @@
PHPAPI int php_default_output_func(const char *str, uint str_len TSRMLS_DC)
{
fwrite(str, 1, str_len, stderr);
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+ fflush(stderr);
+#endif
return str_len;
}
/* }}} */
Property changes on: php/php-src/branches/PHP_5_3_2/tests/security/open_basedir_parse_ini_file.phpt
___________________________________________________________________
Modified: svn:mergeinfo
- /php/php-src/branches/PHP_5_3/tests/security/open_basedir_parse_ini_file.phpt:292562,292566,292571,292574,292716,293146,293152,293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293762,293768,293804,293862,293897,293901-293902,293906,293965,294040
/php/php-src/trunk/tests/security/open_basedir_parse_ini_file.phpt:265951
+ /php/php-src/branches/PHP_5_3/tests/security/open_basedir_parse_ini_file.phpt:292562,292566,292571,292574,292716,293146,293152,293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293762,293768,293804,293862,293897,293901-293902,293906,293965,293985,294040
/php/php-src/trunk/tests/security/open_basedir_parse_ini_file.phpt:265951
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php