r12974 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12973‎ | r12974 | r12975 >
Date:11:05, 7 February 2006
Author:timstarling
Status:old
Tags:
Comment:
Investigated tidy deadlock allegations, couldn't reproduce.
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -623,6 +623,11 @@
624624 $pipes = array();
625625 $process = proc_open("$wgTidyBin -config $wgTidyConf $wgTidyOpts$opts", $descriptorspec, $pipes);
626626 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
627632 fwrite($pipes[0], $text);
628633 fclose($pipes[0]);
629634 while (!feof($pipes[1])) {

Status & tagging log