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

Breadcrumb

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

function Process::isPtySupported

Returns whether PTY is supported on the current operating system.

1 call to Process::isPtySupported()
UnixPipes::getDescriptors in vendor/symfony/process/Pipes/UnixPipes.php
Returns an array of descriptors for the use of proc_open.

File

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

Class

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

Namespace

Symfony\Component\Process

Code

public static function isPtySupported() : bool {
    static $result;
    if (null !== $result) {
        return $result;
    }
    if ('\\' === \DIRECTORY_SEPARATOR) {
        return $result = false;
    }
    return $result = (bool) @proc_open('echo 1 >/dev/null', [
        [
            'pty',
        ],
        [
            'pty',
        ],
        [
            'pty',
        ],
    ], $pipes);
}
RSS feed
Powered by Drupal