什么是terminal?什么是Text terminals?
http://en.wikipedia.org/wiki/Computer_terminal
什么是terminal emulator?
http://en.wikipedia.org/wiki/Terminal_emulator
terminal emulator支持一些escape sequence来控制颜色和鼠标的位置等;
Terminal Control Escape Sequences:
转义字符是在putty中实现的,可参见Terminal.c中的L2378;
http://en.wikipedia.org/wiki/ANSI_escape_code
http://ascii-table.com/ansi-escape-sequences.php
http://www.termsys.demon.co.uk/vtansi.htm
http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt
pseudo terminal的作用:
A pseudo-terminal is mainly used to make a process believe that it interacts with a terminal although it actually interacts with one or more processes.
telnet和pseudo terminal的关系:
http://rachid.koucha.free.fr/tech_corner/pty_pdip.html
http://learn.akae.cn/media/ch34s01.html
telnet的source:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/cmd-inet/usr.sbin/in.telnetd.c
sun官网对pseudo terminal的解释:
http://docs.sun.com/app/docs/doc/801-6679/6i11pd606?l=en&a=view&q=pseudo+terminal+
select调用的解释:
http://linux.die.net/man/2/select
创建pseudo-terminal master and slave:
http://linux.die.net/man/4/ptmx