Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions components/process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,25 @@ absolute path of the executable PHP binary available on your server::
$phpBinaryPath = $phpBinaryFinder->find();
// $phpBinaryPath = '/usr/local/bin/php' (the result will be different on your computer)

Checking for TTY Support
------------------------

Another utility provided by this component is a method called
:method:`Symfony\\Component\\Process\\Process::isTtySupported` which returns
whether `TTY`_ is supported on the current operating system::

use Symfony\Component\Process\Process;

$process = (new Process())->setTty(Process::isTtySupported());

.. versionadded:: 4.1
The ``isTtySupported()`` method was introduced in Symfony 4.1.

.. _`Symfony Issue#5759`: https://github.com/symfony/symfony/issues/5759
.. _`PHP Bug#39992`: https://bugs.php.net/bug.php?id=39992
.. _`exec`: https://en.wikipedia.org/wiki/Exec_(operating_system)
.. _`pid`: https://en.wikipedia.org/wiki/Process_identifier
.. _`PHP Documentation`: https://php.net/manual/en/pcntl.constants.php
.. _Packagist: https://packagist.org/packages/symfony/process
.. _`PHP streams`: http://www.php.net/manual/en/book.stream.php
.. _`TTY`: https://en.wikipedia.org/wiki/Tty_(unix)