check stream_select() return value correctly and avoid endless loop
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.
$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);