X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fprocess%2FPipes%2FWindowsPipes.php;h=d5fa2fdeef67c9ac99536547c1156c411c8a388a;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=87a781ea9204accb369313b4594e15ec2f1807e0;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/symfony/process/Pipes/WindowsPipes.php b/vendor/symfony/process/Pipes/WindowsPipes.php index 87a781ea9..d5fa2fdee 100644 --- a/vendor/symfony/process/Pipes/WindowsPipes.php +++ b/vendor/symfony/process/Pipes/WindowsPipes.php @@ -26,23 +26,19 @@ use Symfony\Component\Process\Exception\RuntimeException; */ class WindowsPipes extends AbstractPipes { - /** @var array */ private $files = array(); - /** @var array */ private $fileHandles = array(); - /** @var array */ private $readBytes = array( Process::STDOUT => 0, Process::STDERR => 0, ); - /** @var bool */ - private $disableOutput; + private $haveReadSupport; - public function __construct($disableOutput, $input) + public function __construct($input, $haveReadSupport) { - $this->disableOutput = (bool) $disableOutput; + $this->haveReadSupport = (bool) $haveReadSupport; - if (!$this->disableOutput) { + if ($this->haveReadSupport) { // Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big. // Workaround for this problem is to use temporary files instead of pipes on Windows platform. // @@ -97,7 +93,7 @@ class WindowsPipes extends AbstractPipes */ public function getDescriptors() { - if ($this->disableOutput) { + if (!$this->haveReadSupport) { $nullstream = fopen('NUL', 'c'); return array( @@ -157,6 +153,14 @@ class WindowsPipes extends AbstractPipes return $read; } + /** + * {@inheritdoc} + */ + public function haveReadSupport() + { + return $this->haveReadSupport; + } + /** * {@inheritdoc} */ @@ -177,19 +181,6 @@ class WindowsPipes extends AbstractPipes $this->fileHandles = array(); } - /** - * Creates a new WindowsPipes instance. - * - * @param Process $process The process - * @param $input - * - * @return static - */ - public static function create(Process $process, $input) - { - return new static($process->isOutputDisabled(), $input); - } - /** * Removes temporary files. */