You are here

public function WindowsPipes::getDescriptors in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/process/Pipes/WindowsPipes.php \Symfony\Component\Process\Pipes\WindowsPipes::getDescriptors()

Returns an array of descriptors for the use of proc_open.

Return value

array

Overrides PipesInterface::getDescriptors

File

vendor/symfony/process/Pipes/WindowsPipes.php, line 77

Class

WindowsPipes
WindowsPipes implementation uses temporary files as handles.

Namespace

Symfony\Component\Process\Pipes

Code

public function getDescriptors() {
  if ($this->disableOutput) {
    $nullstream = fopen('NUL', 'c');
    return array(
      array(
        'pipe',
        'r',
      ),
      $nullstream,
      $nullstream,
    );
  }

  // We're not using pipe on Windows platform as it hangs (https://bugs.php.net/bug.php?id=51800)
  // We're not using file handles as it can produce corrupted output https://bugs.php.net/bug.php?id=65650
  // So we redirect output within the commandline and pass the nul device to the process
  return array(
    array(
      'pipe',
      'r',
    ),
    array(
      'file',
      'NUL',
      'w',
    ),
    array(
      'file',
      'NUL',
      'w',
    ),
  );
}