X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fsymfony%2Fprocess%2FPipes%2FWindowsPipes.php;fp=vendor%2Fsymfony%2Fprocess%2FPipes%2FWindowsPipes.php;h=a1e3115519f35fe1ffc4f136e207f15e2304987f;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=87a781ea9204accb369313b4594e15ec2f1807e0;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/vendor/symfony/process/Pipes/WindowsPipes.php b/vendor/symfony/process/Pipes/WindowsPipes.php index 87a781ea9..a1e311551 100644 --- a/vendor/symfony/process/Pipes/WindowsPipes.php +++ b/vendor/symfony/process/Pipes/WindowsPipes.php @@ -36,13 +36,13 @@ class WindowsPipes extends AbstractPipes 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 +97,7 @@ class WindowsPipes extends AbstractPipes */ public function getDescriptors() { - if ($this->disableOutput) { + if (!$this->haveReadSupport) { $nullstream = fopen('NUL', 'c'); return array( @@ -157,6 +157,14 @@ class WindowsPipes extends AbstractPipes return $read; } + /** + * {@inheritdoc} + */ + public function haveReadSupport() + { + return $this->haveReadSupport; + } + /** * {@inheritdoc} */ @@ -177,19 +185,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. */