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

Breadcrumb

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

function Process::setTty

Enables or disables the TTY mode.

Return value

$this

Throws

RuntimeException In case the TTY mode is not supported

File

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

Class

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

Namespace

Symfony\Component\Process

Code

public function setTty(bool $tty) : static {
    if ('\\' === \DIRECTORY_SEPARATOR && $tty) {
        throw new RuntimeException('TTY mode is not supported on Windows platform.');
    }
    if ($tty && !self::isTtySupported()) {
        throw new RuntimeException('TTY mode requires /dev/tty to be read/writable.');
    }
    $this->tty = $tty;
    return $this;
}
RSS feed
Powered by Drupal