comparison vendor/symfony/process/Pipes/UnixPipes.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children c2387f117808
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
20 * 20 *
21 * @internal 21 * @internal
22 */ 22 */
23 class UnixPipes extends AbstractPipes 23 class UnixPipes extends AbstractPipes
24 { 24 {
25 /** @var bool */
26 private $ttyMode; 25 private $ttyMode;
27 /** @var bool */
28 private $ptyMode; 26 private $ptyMode;
29 /** @var bool */
30 private $haveReadSupport; 27 private $haveReadSupport;
31 28
32 public function __construct($ttyMode, $ptyMode, $input, $haveReadSupport) 29 public function __construct($ttyMode, $ptyMode, $input, $haveReadSupport)
33 { 30 {
34 $this->ttyMode = (bool) $ttyMode; 31 $this->ttyMode = (bool) $ttyMode;
100 $read = $e = array(); 97 $read = $e = array();
101 $r = $this->pipes; 98 $r = $this->pipes;
102 unset($r[0]); 99 unset($r[0]);
103 100
104 // let's have a look if something changed in streams 101 // let's have a look if something changed in streams
105 if (($r || $w) && false === $n = @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { 102 if (($r || $w) && false === @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) {
106 // if a system call has been interrupted, forget about it, let's try again 103 // if a system call has been interrupted, forget about it, let's try again
107 // otherwise, an error occurred, let's reset pipes 104 // otherwise, an error occurred, let's reset pipes
108 if (!$this->hasSystemCallBeenInterrupted()) { 105 if (!$this->hasSystemCallBeenInterrupted()) {
109 $this->pipes = array(); 106 $this->pipes = array();
110 } 107 }