On 01/19/2015 11:36 AM, Howard Chu wrote: > Peter Hurley wrote: [...] >> A description of how the pty master uses EXTPROC to implement line mode would >> be very helpful, especially to people working in the tty code (eg., me, although >> I don't need it now). > > The original patch submission carried this description > http://lkml.iu.edu/hypermail/linux/kernel/1006.2/02428.html [from linked source] > Paraphrased from the 1989 BSD patch by David Borman @ cray.com: > > These are the changes needed for the kernel to support > LINEMODE in the server. > > There is a new bit in the termios local flag word, EXTPROC. > When this bit is set, several aspects of the terminal driver > are disabled. Input line editing, character echo, and mapping > of signals are all disabled. This allows the telnetd to turn > off these functions when in linemode, but still keep track of > what state the user wants the terminal to be in. Ok, but this should go on to describe at least the basics of transparent local/remote line editing. Even mentioning that it should be transparent is important. > New ioctl: > TIOCSIG Generate a signal to processes in the > current process group of the pty. Yes, but documentation should describe why this is important/required/useful. That is, how this supports client signal handling. > There is a new mode for packet driver, the TIOCPKT_IOCTL bit. > When packet mode is turned on in the pty, and the EXTPROC bit > is set, then whenever the state of the pty is changed, the > next read on the master side of the pty will have the TIOCPKT_IOCTL > bit set. This allows the process on the server side of the pty > to know when the state of the terminal has changed; it can then > issue the appropriate ioctl to retrieve the new state. ... and go on to outline in a sentence or two what the pty master process does with this information. IOW, _how_ does this kernel interface support LINEMODE? Regards, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html