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

Breadcrumb

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

function Terminal::hasSttyAvailable

@internal

4 calls to Terminal::hasSttyAvailable()
Application::doRunCommand in vendor/symfony/console/Application.php
Runs the current command.
QuestionHelper::doAsk in vendor/symfony/console/Helper/QuestionHelper.php
Asks the question to the user.
QuestionHelper::getHiddenResponse in vendor/symfony/console/Helper/QuestionHelper.php
Gets a hidden response from user.
Terminal::initDimensions in vendor/symfony/console/Terminal.php

File

vendor/symfony/console/Terminal.php, line 120

Class

Terminal

Namespace

Symfony\Component\Console

Code

public static function hasSttyAvailable() : bool {
    if (null !== self::$stty) {
        return self::$stty;
    }
    // skip check if shell_exec function is disabled
    if (!\function_exists('shell_exec')) {
        return false;
    }
    return self::$stty = (bool) shell_exec('stty 2> ' . ('\\' === \DIRECTORY_SEPARATOR ? 'NUL' : '/dev/null'));
}

API Navigation

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