hholzgra                Tue Jul 15 13:05:04 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/ext/standard/tests/file    proc_open01.phpt 
  Log:
  MFH
  
  
Index: php-src/ext/standard/tests/file/proc_open01.phpt
diff -u php-src/ext/standard/tests/file/proc_open01.phpt:1.1.2.1 
php-src/ext/standard/tests/file/proc_open01.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/proc_open01.phpt:1.1.2.1    Sun Jul 13 15:46:39 
2003
+++ php-src/ext/standard/tests/file/proc_open01.phpt    Tue Jul 15 13:05:03 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

Reply via email to