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


2.5 虚拟文件系统(sysfs,proc,tsmpfs等) 2.5.1 虚拟文件系统概述 2.5.2 proc 文件系统 2.5.3 sysfs文件系统 2.5.4 tmpfs文件系统 2...
  • x123niuniuniu
  • x123niuniuniu
  • 2012年05月29日 17:32
  • 1076


mount -t proc none /proc    作用:将内核中proc虚拟文件系统挂载到/proc目录下 ,可以查看进程id mount -t devpts devpts /dev/pts ...
  • liuwei423210896
  • liuwei423210896
  • 2015年09月09日 21:25
  • 232

recovery 中tmpfs的使用及tmpfs简介

1 recovery里面的tmpfs的作用:利用虚拟内存下载升级镜像。也就是/tmp目录。 在recovery里面的init.rc里面有 mount /tmp /tmp tmpfs正是利用tmpfs...
  • wuxy_shenzhen
  • wuxy_shenzhen
  • 2012年05月29日 15:06
  • 2319


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

What is an Object?(转载)

Objects defined        So what is an object? An object is a component of a program that knows how to...
  • sky911911
  • sky911911
  • 2005年02月06日 11:00
  • 2545

《what if》

  • u013593035
  • u013593035
  • 2015年10月09日 16:42
  • 637

What is an object?(CVPR2010) 论文及代码解读

  • sgfmby1994
  • sgfmby1994
  • 2017年11月02日 11:04
  • 182


main里面这样: for(;;){ try{ q_mytype.enQ(MyType()); }catch(exception& e){ cout break; } }...
  • ndfeixia
  • ndfeixia
  • 2016年04月20日 23:50
  • 917

CentOS6.0 安装VMWare tools遇到到问题“What is the location of the directory..."

CentOS6.0  为desktop安装环境,在安装VMWare tools时遇到 gcc未安装到问题, 直接 yum -y install gcc 完成安装。 再次尝试安装VMWare tool...
  • ddl007
  • ddl007
  • 2011年11月07日 23:13
  • 2254

What is Logo?

  • wildecsdn
  • wildecsdn
  • 2005年11月08日 19:53
  • 1240
您举报文章:what is devpts