From: Hartmut Holzgraefe Date: Tue, 15 Jul 2003 16:55:44 +0000 (+0000) Subject: #1 $_ENV is not always set, use getenv() instead X-Git-Tag: BEFORE_ARG_INFO~238 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f5a3b4c6302ed3c6819f8e88d434e1c17302766;p=php #1 $_ENV is not always set, use getenv() instead #2 bail out after 1000 loop iterations to avoid hanging tests --- diff --git a/ext/standard/tests/file/proc_open01.phpt b/ext/standard/tests/file/proc_open01.phpt index ab41a35819..d1e066e092 100644 --- a/ext/standard/tests/file/proc_open01.phpt +++ b/ext/standard/tests/file/proc_open01.phpt @@ -4,8 +4,12 @@ proc_open() regression test 1 (proc_open() leak) array('pipe', 'r'), 1 => array('pipe', 'w')), $pipes ); @@ -19,7 +23,12 @@ fwrite($pipes[0], $test_string); 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) {