what is devpts

转载 2011年01月14日 17:04:00

Applications such as an xterm or sshd simulate a terminal. This works using 2 special files, a pseudo-tty master that the xterm/... writes to and reads from and a pseudo-tty slave that the applications using the simulated terminal (such as the bash running in the xterm) read from and write to. Traditionally you had lots of /dev/files for these. The masters are called ptyp0, ptyp1,... and the slaves are called ttyp0, ttyp1,.... These files make up a significant portion of your /dev tree if you use MAKEDEV generic. This approach is rather dumb because it uses lots of device nodes and restricts the number of pseudo-ttys (and consequentially the number of xterms/ssh sessions/...). There is a better approach, though. It uses a single master multiplexer /dev/ptmx and slaves /dev/pts/<number> that are created on demand. For this to work devpts filesystem must be mounted at /dev/pts (and devpts must be compiled in the kernel, I think it's called "Unix98 terminal support" or something like this). I think if you use devfs (don't confuse the 2), you don't need devpts anymore, otherwise it's a good idea to include devpts support in your kernel and put devpts in fstab (the LFS book demonstrates how). Then pass 'generic-nopty' to MAKEDEV instead of 'generic'. This will give you a cleaner /dev. All recent versions of xterm,... know how to use the Unix98 pseudo-terminals and unlike devfs devpts is stable

相关文章推荐

_What is Cone-Beam CT

  • 2016年02月23日 21:12
  • 2.03MB
  • 下载

What is Computer Science

  • 2014年10月15日 08:05
  • 4.09MB
  • 下载

What Is the Redo Log?什么是重做日志?

Oracle官方原文:查看原文 The most crucial structure for recovery operations is the redo log, which consists ...

what is statistics.

  • 2014年08月06日 16:54
  • 888KB
  • 下载

what is html5

  • 2013年01月08日 10:26
  • 3.46MB
  • 下载

翻译github help之Github Pages《what-is-github-pages》

本文主要是翻译GitHub Pages Support成中文。便于国内人员遇到问题能够尽快得到帮助。...

Pair Programming What is in it for me.pdf

  • 2011年08月22日 10:35
  • 353KB
  • 下载

what is GIS

  • 2017年06月01日 14:01
  • 5.02MB
  • 下载

HDU-1201 18岁生日 HDU-2113 What day is it

18岁生日 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Su...

What is EDI Whitepaper

  • 2015年08月21日 18:12
  • 292KB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:what is devpts
举报原因:
原因补充:

(最多只允许输入30个字)