Symfony-docs: [Process] Explain setTtty(), setPty() and related methods

Created on 26 Jan 2016  路  5Comments  路  Source: symfony/symfony-docs

The Process component defines methods like setTty(), setPty(), isPtySupported(), etc. We should explain what do those method mean.

This issue shows how a problem could be solved just by using setTty() method: https://github.com/symfony/symfony/issues/17010

Process

Most helpful comment

@ogizanagi let's call it "the TTY lottery" then. It can solve all your problems ... or ruin everything!

All 5 comments

Here is another example where using ->setTty(true) magically solved all the problems: https://github.com/symfony/symfony/issues/15626

@ogizanagi let's call it "the TTY lottery" then. It can solve all your problems ... or ruin everything!

Interesting. I think the lack of understanding of shells/ttys is the main problem here.

I was also looking for an option to get colored output from an started Process.

Agreed that a basic TTY understanding is the ideal solution here but it's difficult to learn/know everything in this complicated world. Maybe a short #explainlikeimfive description can be added?

That said, the guide[1] does not include the string tty at all, or at least I assume that's what this doc issue is referring to. I might come up with something but it'd be vague as my uneducated brain thinks ttyl whenever it comes across tty ;)

[1] https://symfony.com/doc/current/components/process.html

Was this page helpful?
0 / 5 - 0 ratings