3 ms·
Thank you very much, now I have an idea of how does mouse support work in a Linux terminal. However, I still don't understand how does a program know it's conn
by qwerty456127 6y ago
Thank you very much, now I have an idea of how does mouse support work in a Linux terminal.
However, I still don't understand how does a program know it's connected to a terminal rather than some pipes.
- surajrmal 6y agoBoth the terminal or pipe show up as a preopened file descriptor to your process. You can pass that file descriptor to the isatty posix function call which will inform you whether the file is a tty (in most cases a terminal) or not.