You are here

private function Process::getDescriptors in Zircon Profile 8

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

Creates the descriptors needed by the proc_open.

Return value

array

1 call to Process::getDescriptors()
Process::start in vendor/symfony/process/Process.php
Starts the process and returns after writing the input to STDIN.

File

vendor/symfony/process/Process.php, line 1246

Class

Process
Process is a thin wrapper around proc_* functions to easily start independent PHP processes.

Namespace

Symfony\Component\Process

Code

private function getDescriptors() {
  if ('\\' === DIRECTORY_SEPARATOR) {
    $this->processPipes = WindowsPipes::create($this, $this->input);
  }
  else {
    $this->processPipes = UnixPipes::create($this, $this->input);
  }
  $descriptors = $this->processPipes
    ->getDescriptors($this->outputDisabled);
  if (!$this->useFileHandles && $this->enhanceSigchildCompatibility && $this
    ->isSigchildEnabled()) {

    // last exit code is output on the fourth pipe and caught to work around --enable-sigchild
    $descriptors = array_merge($descriptors, array(
      array(
        'pipe',
        'w',
      ),
    ));
    $this->commandline = '(' . $this->commandline . ') 3>/dev/null; code=$?; echo $code >&3; exit $code';
  }
  return $descriptors;
}