mirror of
https://github.com/php/php-src.git
synced 2025-01-22 11:44:09 +08:00
bail out if unicode.semantics is On (stream_select() is unable to cast Unicode streams to FDs)
check stream_select() return value correctly and avoid endless loop
This commit is contained in:
parent
63d2c1f093
commit
77e3b99726
@ -82,6 +82,10 @@ if (ob_get_level()) echo "Not all buffers were deleted.\n";
|
||||
error_reporting(E_ALL);
|
||||
ini_set('magic_quotes_runtime',0); // this would break tests by modifying EXPECT sections
|
||||
|
||||
if (ini_get("unicode.semantics")) {
|
||||
error("It is currently not possible to use run-tests.php with unicode.semantics=On. Please turn it Off and re-run the tests.");
|
||||
}
|
||||
|
||||
$environment = isset($_ENV) ? $_ENV : array();
|
||||
|
||||
// Don't ever guess at the PHP executable location.
|
||||
@ -869,7 +873,9 @@ function system_with_timeout($commandline, $env = null, $stdin = null)
|
||||
$e = null;
|
||||
$n = @stream_select($r, $w, $e, $leak_check ? 300 : 60);
|
||||
|
||||
if ($n === 0) {
|
||||
if ($n === false) {
|
||||
break;
|
||||
} else if ($n === 0) {
|
||||
/* timed out */
|
||||
$data .= "\n ** ERROR: process timed out **\n";
|
||||
proc_terminate($proc);
|
||||
|
Loading…
Reference in New Issue
Block a user