diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index d762602925..0c886d1c0e 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -792,6 +792,9 @@ class Process if ('\\' === DIRECTORY_SEPARATOR && $tty) { throw new RuntimeException('TTY mode is not supported on Windows platform.'); } + if ($tty && (!file_exists('/dev/tty') || !is_readable('/dev/tty'))) { + throw new RuntimeException('TTY mode requires /dev/tty to be readable.'); + } $this->tty = (bool) $tty;