Index: trunk/phase3/includes/Parser.php |
— | — | @@ -623,6 +623,11 @@ |
624 | 624 | $pipes = array(); |
625 | 625 | $process = proc_open("$wgTidyBin -config $wgTidyConf $wgTidyOpts$opts", $descriptorspec, $pipes); |
626 | 626 | if (is_resource($process)) { |
| 627 | + // Theoretically, this style of communication could cause a deadlock |
| 628 | + // here. If the stdout buffer fills up, then writes to stdin could |
| 629 | + // block. This doesn't appear to happen with tidy, because tidy only |
| 630 | + // writes to stdout after it's finished reading from stdin. Search |
| 631 | + // for tidyParseStdin and tidySaveStdout in console/tidy.c |
627 | 632 | fwrite($pipes[0], $text); |
628 | 633 | fclose($pipes[0]); |
629 | 634 | while (!feof($pipes[1])) { |