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

Breadcrumb

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

function WindowsPipes::getDescriptors

Overrides PipesInterface::getDescriptors

File

vendor/symfony/process/Pipes/WindowsPipes.php, line 105

Class

WindowsPipes
WindowsPipes implementation uses temporary files as handles.

Namespace

Symfony\Component\Process\Pipes

Code

public function getDescriptors() : array {
    if (!$this->haveReadSupport) {
        $nullstream = fopen('NUL', 'c');
        return [
            [
                'pipe',
                'r',
            ],
            $nullstream,
            $nullstream,
        ];
    }
    // We're not using pipe on Windows platform as it hangs (https://bugs.php.net/51800)
    // We're not using file handles as it can produce corrupted output https://bugs.php.net/65650
    // So we redirect output within the commandline and pass the nul device to the process
    return [
        [
            'pipe',
            'r',
        ],
        [
            'file',
            'NUL',
            'w',
        ],
        [
            'file',
            'NUL',
            'w',
        ],
    ];
}

API Navigation

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