From: Chris S. <san...@us...> - 2005-06-14 17:17:09
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19691/scripts Modified Files: Tag: frontend_dev stackWin.php Log Message: Index: stackWin.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackWin.php,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** stackWin.php 13 Jun 2005 16:27:31 -0000 1.2.2.1 --- stackWin.php 14 Jun 2005 17:17:00 -0000 1.2.2.2 *************** *** 88,118 **** fwrite($pipes[0], $strin); fwrite($pipes[0], $stack_cas['closeCommand']."\n\n"); $ret = ''; // read output from stdout $start_time = stack_microtime_float(); - $continue = TRUE; while (!feof($pipes[1])) { $out = fgets($pipes[1], 1024); $ret .= $out; //echo $out; $now = stack_microtime_float(); ! if (($now-$start_time) > 0.3) { ! if ($continue) { ! $continue = FALSE; ! } ! // CTRL+C should be ASCII 3. ! //fwrite($pipes[0], chr(3)); ! fwrite($pipes[0], chr(27)."[13~"); ! fflush($pipes[0]); ! } } fclose($pipes[0]); - - //$end_time = stack_microtime_float(); - //$time_taken = $end_time - $start_time; - //echo "<br />Time taken: ".$time_taken; - fclose($pipes[1]); } else { --- 88,117 ---- fwrite($pipes[0], $strin); fwrite($pipes[0], $stack_cas['closeCommand']."\n\n"); + fflush($pipes[0]); $ret = ''; // read output from stdout $start_time = stack_microtime_float(); while (!feof($pipes[1])) { $out = fgets($pipes[1], 1024); + if ('' == $out) { + // PAUSE + usleep(1000); + } $ret .= $out; //echo $out; $now = stack_microtime_float(); ! // if (($now-$start_time) > 0.3) { ! // // CTRL+C should be ASCII 3. ! // //fwrite($pipes[0], chr(3)); ! // fwrite($pipes[0], chr(27)."[13~"); ! // fflush($pipes[0]); ! // } } fclose($pipes[0]); fclose($pipes[1]); + //$time_taken = $now-$start_time; + //echo "Start: $start_time<br >End: $now<br >Taken = $time_taken"; + } else { |