What is "tty" on FreeBSD?

"the uprintf () function outputs to the current process 'control tty'

This is a description of uprintf () from Freebsd MAN. I do not understand what is tty? Thank you. Nick holiday!

+3
source share
4 answers

A tty is an abstract character input / output device model. This is the most direct system interface with corresponding application interfaces.

Teletype Corporation once existed. They made automatic typewriters that were used as communication terminals for decades, and then redesigned as computer terminals. Teletype has been generalized to teletype or teleprinter to avoid using the brand name.

Initially, they were functional, but rather ugly ...

alt text

But later models (this model 43 from the late 1970s) were pretty pretty ...

alt text

The microprocessor made the video display terminals practical; previously, hard-copy terminals were slightly cheaper and much more popular. As it happens, the Unix tty abstraction did a great job for video terminals.

And this works great for the xterm and xterm children windows (usually called Terminal), which will be found on Linux, Mac, and other descendants of Unix ...

+19

" tty" , "tty" - . tty = , . "tty" man FreeBSD , .

.. . , "tty" . tty. , , . tty psuedo- "pty". "" , . , , . - , .

Unices, tty . " " " ". tty , , . , SIGTSTP.

+5

According to Wikipedia, the name comes from the teletype, abbreviated "TTY". Printing directly to tty means that it prints the message directly to the console, even if STDOUT was redirected to a file or other process.

0
source

This is actually the name of your current input device from your system ... in most cases, your keyboard.

mac-user:~$ tty
    /dev/ttys001

that means your keyboard is a ttys001 device

0
source

Source: https://habr.com/ru/post/1782134/


All Articles