<?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
);
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) {