hholzgra Tue Jul 15 12:55:44 2003 EDT Modified files: /php-src/ext/standard/tests/file proc_open01.phpt Log: #1 $_ENV is not always set, use getenv() instead #2 bail out after 1000 loop iterations to avoid hanging tests Index: php-src/ext/standard/tests/file/proc_open01.phpt diff -u php-src/ext/standard/tests/file/proc_open01.phpt:1.1 php-src/ext/standard/tests/file/proc_open01.phpt:1.2 --- php-src/ext/standard/tests/file/proc_open01.phpt:1.1 Sun Jul 13 04:03:46 2003 +++ php-src/ext/standard/tests/file/proc_open01.phpt Tue Jul 15 12:55:44 2003 @@ -4,8 +4,12 @@ <?php $pipes = array(1, 2, 3); $orig_pipes = $pipes; +$php = getenv('TEST_PHP_EXECUTABLE'); +if ($php === false) { + die("no php executable defined"); +} $proc = proc_open( - $_ENV['TEST_PHP_EXECUTABLE'], + $php, array(0 => array('pipe', 'r'), 1 => array('pipe', 'w')), $pipes ); @@ -19,7 +23,12 @@ fflush($pipes[0]); fclose($pipes[0]); $cnt = ''; +$n=0; for ($left = strlen($test_string); $left > 0;) { + if (++$n >1000) { + print "terminated after 1000 iterations\n"; + break; + } $read_fds = array($pipes[1]); $retval = stream_select($read_fds, $write_fds = NULL, $exp_fds = NULL, 1); if ($retval === false) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php