2008-08-22 105 views

回答

1

see this

对于伪端子对诸如 ptyp3和ttyp3中,PTY ...是 主或控制终端和 TTY ...是从机。 ttyp只有16个 :ttyp0-ttypf(f是一个 十六进制数字)。 要获得更多 对,3个字母q,r,s可以是 而不是p。例如 pair ttys8,ptys8是伪终端 对。主设备和从真的 相同的“端口”,但是从设备是由应用程序使用 和 主是由供给网络程序 (或类似物)中使用(和 得到)数据向/从从端口。

0

在Linux devices.txt中的文件在内核中的文档,它说:

3 char Pseudo-TTY slaves 
     0 = /dev/ttyp0 First PTY slave 
     1 = /dev/ttyp1 Second PTY slave 
     ... 
    255 = /dev/ttyef 256th PTY slave 

    These are the old-style (BSD) PTY devices; Unix98 
    devices are on major 136 and above. 

,并接着说

4 char TTY devices 
     0 = /dev/tty0  Current virtual console 

     1 = /dev/tty1  First virtual console 
     ... 
    63 = /dev/tty63 63rd virtual console 
    64 = /dev/ttyS0 First UART serial port 
     ... 
    255 = /dev/ttyS191 192nd UART serial port 

    UART serial ports refer to 8250/16450/16550 series devices. 

    Older versions of the Linux kernel used this major 
    number for BSD PTY devices. As of Linux 2.1.115, this 
    is no longer supported. Use major numbers 2 and 3. 

我不不知道这对你有多大帮助,但应该让你开始朝正确的方向发展。