Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Process.php

function Process::readPipes

Reads pipes, executes callback.

Parameters

bool $blocking Whether to use blocking calls or not:

bool $close Whether to close file handles or not:

2 calls to Process::readPipes()
Process::updateStatus in vendor/symfony/process/Process.php
Updates the status of the process, reads pipes.
Process::wait in vendor/symfony/process/Process.php
Waits for the process to terminate.

File

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

Class

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

Namespace

Symfony\Component\Process

Code

private function readPipes(bool $blocking, bool $close) : void {
    $result = $this->processPipes
        ->readAndWrite($blocking, $close);
    $callback = $this->callback;
    foreach ($result as $type => $data) {
        if (3 !== $type) {
            $callback(self::STDOUT === $type ? self::OUT : self::ERR, $data);
        }
        elseif (!isset($this->fallbackStatus['signaled'])) {
            $this->fallbackStatus['exitcode'] = (int) $data;
        }
    }
}
RSS feed
Powered by Drupal