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

Breadcrumb

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

function UnixPipes::getDescriptors

Overrides PipesInterface::getDescriptors

File

vendor/symfony/process/Pipes/UnixPipes.php, line 49

Class

UnixPipes
UnixPipes implementation uses unix pipes as handles.

Namespace

Symfony\Component\Process\Pipes

Code

public function getDescriptors() : array {
    if (!$this->haveReadSupport) {
        $nullstream = fopen('/dev/null', 'c');
        return [
            [
                'pipe',
                'r',
            ],
            $nullstream,
            $nullstream,
        ];
    }
    if ($this->ttyMode) {
        return [
            [
                'file',
                '/dev/tty',
                'r',
            ],
            [
                'file',
                '/dev/tty',
                'w',
            ],
            [
                'file',
                '/dev/tty',
                'w',
            ],
        ];
    }
    if ($this->ptyMode && Process::isPtySupported()) {
        return [
            [
                'pty',
            ],
            [
                'pty',
            ],
            [
                'pty',
            ],
        ];
    }
    return [
        [
            'pipe',
            'r',
        ],
        [
            'pipe',
            'w',
        ],
        // stdout
[
            'pipe',
            'w',
        ],
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal