X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fprocess%2FPipes%2FUnixPipes.php;h=254df51902cb7b36fc285bb35ab07b719e5cf9c5;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=3185fe76ee03fd165f48453de1e8e1ecf26d1faa;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/vendor/symfony/process/Pipes/UnixPipes.php b/vendor/symfony/process/Pipes/UnixPipes.php index 3185fe76e..254df5190 100644 --- a/vendor/symfony/process/Pipes/UnixPipes.php +++ b/vendor/symfony/process/Pipes/UnixPipes.php @@ -22,11 +22,8 @@ use Symfony\Component\Process\Process; */ class UnixPipes extends AbstractPipes { - /** @var bool */ private $ttyMode; - /** @var bool */ private $ptyMode; - /** @var bool */ private $haveReadSupport; public function __construct($ttyMode, $ptyMode, $input, $haveReadSupport) @@ -102,7 +99,9 @@ class UnixPipes extends AbstractPipes unset($r[0]); // let's have a look if something changed in streams - if (($r || $w) && false === $n = @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { + set_error_handler(array($this, 'handleError')); + if (($r || $w) && false === stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { + restore_error_handler(); // if a system call has been interrupted, forget about it, let's try again // otherwise, an error occurred, let's reset pipes if (!$this->hasSystemCallBeenInterrupted()) { @@ -111,6 +110,7 @@ class UnixPipes extends AbstractPipes return $read; } + restore_error_handler(); foreach ($r as $pipe) { // prior PHP 5.4 the array passed to stream_select is modified and