What do pty and tty mean?

后端 未结 5 1714
情话喂你
情话喂你 2020-12-02 03:41

I noticed there are many mentions of pty and tty in some opensource projects, could someone can tell me what do they mean and what is the differenc

5条回答
  •  情话喂你
    2020-12-02 04:03

    "tty" originally meant "teletype" and "pty" means "pseudo-teletype".

    In UNIX, /dev/tty* is any device that acts like a "teletype", ie, a terminal. (Called teletype because that's what we had for terminals in those benighted days.)

    A pty is a pseudotty, a device entry that acts like a terminal to the process reading and writing there, but is managed by something else. They first appeared (as I recall) for X Window and screen and the like, where you needed something that acted like a terminal but could be used from another program.

提交回复
热议问题