pty 和 tty 是什么意思? [英] What do pty and tty mean?

查看:46
本文介绍了pty 和 tty 是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到在一些开源项目中多次提到 ptytty,谁能告诉我它们是什么意思,它们之间有什么区别?

I noticed many mentions of pty and tty in some open source projects, could someone tell me what do they mean and what is the difference between them?

推荐答案

tty"原意为电传打字机",pty"原意为伪电传打字机".

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

在 UNIX 中,/dev/tty* 是任何充当电传打字机"的设备,即终端.(之所以称为电传打字机,是因为那是我们在那些黑夜的日子里用于终端的东西.)

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.)

一个 pty 是一个伪对象,一个设备入口,它充当进程在那里读写的终端,但由其他东西管理.它们首先出现(我记得)用于 X Window 和 screen 等,在那里你需要一些像终端一样的东西,但可以从另一个程序中使用.

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.

这篇关于pty 和 tty 是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆