From 089357da448536353b6cfe118c459f62cce4b82c Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 7 Feb 2006 11:05:00 +0000 Subject: [PATCH] Investigated tidy deadlock allegations, couldn't reproduce. --- includes/Parser.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/Parser.php b/includes/Parser.php index bbe08ae720..0d73a4a916 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -623,6 +623,11 @@ class Parser $pipes = array(); $process = proc_open("$wgTidyBin -config $wgTidyConf $wgTidyOpts$opts", $descriptorspec, $pipes); if (is_resource($process)) { + // Theoretically, this style of communication could cause a deadlock + // here. If the stdout buffer fills up, then writes to stdin could + // block. This doesn't appear to happen with tidy, because tidy only + // writes to stdout after it's finished reading from stdin. Search + // for tidyParseStdin and tidySaveStdout in console/tidy.c fwrite($pipes[0], $text); fclose($pipes[0]); while (!feof($pipes[1])) { -- 2.20.1