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


1. 查看系统所支持的文件系统的方法 1.1 通过命令查看    mount    df    fdisk    file    parted    fstab 1.2 通过系...
  • qq2007xia
  • qq2007xia
  • 2014年10月30日 18:08
  • 1066


我们打开一个terminal,那么将会在devpts文件系统/dev/pts下创建一个对应的pts字符文件, 该pts字符文件节点直接由/dev/ptmx节点的驱动函数ptmx_open() 调用...
  • u011279649
  • u011279649
  • 2013年08月08日 11:27
  • 1493

像素是什么(What Is a Pixel)

  • natsu1211
  • natsu1211
  • 2014年04月25日 13:20
  • 1516

_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 statistics.

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

what is html5

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

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
  • 下载

What is EDI Whitepaper

  • 2015年08月21日 18:12
  • 292KB
  • 下载
您举报文章:what is devpts