コード例 #1
0
ファイル: Process.php プロジェクト: tifabien/symfony
 /**
  * Creates the descriptors needed by the proc_open.
  *
  * @return array
  */
 private function getDescriptors()
 {
     if ('\\' === DIRECTORY_SEPARATOR) {
         $this->processPipes = WindowsPipes::create($this, $this->input);
     } else {
         $this->processPipes = UnixPipes::create($this, $this->input);
     }
     return $this->processPipes->getDescriptors();
 }
コード例 #2
0
ファイル: Process.php プロジェクト: NicholasTaylorUK/symfony
 /**
  * Creates the descriptors needed by the proc_open.
  *
  * @return array
  */
 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;
 }
コード例 #3
0
ファイル: Process.php プロジェクト: NothingWeAre/symfony
 /**
  * Creates the descriptors needed by the proc_open.
  *
  * @return array
  */
 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[3] = array('pipe', 'w');
         $trap = '';
         foreach (self::$posixSignals as $s) {
             $trap .= "trap 'echo s{$s} >&3' {$s};";
         }
         $this->commandline = $trap . '{ (' . $this->commandline . ') <&3 3<&- 3>/dev/null & } 3<&0;';
         $this->commandline .= 'pid=$!; echo p$pid >&3; wait $pid; code=$?; echo x$code >&3; exit $code';
     }
     return $descriptors;
 }