X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fprocess%2FPipes%2FAbstractPipes.php;fp=vendor%2Fsymfony%2Fprocess%2FPipes%2FAbstractPipes.php;h=9a7d88be896f45fde753bfdd03ddab3e202c65e3;hp=4c67d5b82c31a24113ef8a4223d9f12f1cc50d70;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/symfony/process/Pipes/AbstractPipes.php b/vendor/symfony/process/Pipes/AbstractPipes.php index 4c67d5b82..9a7d88be8 100644 --- a/vendor/symfony/process/Pipes/AbstractPipes.php +++ b/vendor/symfony/process/Pipes/AbstractPipes.php @@ -20,16 +20,16 @@ use Symfony\Component\Process\Exception\InvalidArgumentException; */ abstract class AbstractPipes implements PipesInterface { - /** @var array */ public $pipes = array(); - /** @var string */ private $inputBuffer = ''; - /** @var resource|scalar|\Iterator|null */ private $input; - /** @var bool */ private $blocked = true; + private $lastError; + /** + * @param resource|string|int|float|bool|\Iterator|null $input + */ public function __construct($input) { if (is_resource($input) || $input instanceof \Iterator) { @@ -59,10 +59,11 @@ abstract class AbstractPipes implements PipesInterface */ protected function hasSystemCallBeenInterrupted() { - $lastError = error_get_last(); + $lastError = $this->lastError; + $this->lastError = null; // stream_select returns false when the `select` system call is interrupted by an incoming signal - return isset($lastError['message']) && false !== stripos($lastError['message'], 'interrupted system call'); + return null !== $lastError && false !== stripos($lastError, 'interrupted system call'); } /** @@ -120,7 +121,7 @@ abstract class AbstractPipes implements PipesInterface $w = array($this->pipes[0]); // let's have a look if something changed in streams - if (false === $n = @stream_select($r, $w, $e, 0, 0)) { + if (false === @stream_select($r, $w, $e, 0, 0)) { return; } @@ -166,4 +167,12 @@ abstract class AbstractPipes implements PipesInterface return array($this->pipes[0]); } } + + /** + * @internal + */ + public function handleError($type, $msg) + { + $this->lastError = $msg; + } }