Fix IXANY and restart after signal (e.g. ctrl-C) in n_tty line discipline
authorJoe Peterson <joe@skyrush.com>
Wed, 6 Feb 2008 09:37:59 +0000 (01:37 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 6 Feb 2008 18:41:09 +0000 (10:41 -0800)
commit54d2a37eda3211d3b14c162238e9ccee43e023a9
tree53318adeb908a9f6f4f9ce81ca41043cb0b248b8
parent1373bed34e30b8632aaf43aa85d72329c83f7077
Fix IXANY and restart after signal (e.g. ctrl-C) in n_tty line discipline

Fix two N_TTY line discipline issues related to resuming a stopped TTY
(typically done with ctrl-S):

1) Fix handling of character that resumes a stopped TTY (with IXANY)

With "stty ixany", the TTY line discipline would lose the first character
after the stop, so typing, for example, "hi^Sthere" resulted in "hihere"
(the 't' would cause the resume after ^S, but it would then be thrown away
rather than processed as an input character).  This was inconsistent with
the behavior of other Unix systems.

2) Fix interrupt signal (e.g. ctrl-C) behavior in stopped TTYs

With "stty -ixany" (often the default), interrupt signals were ignored
in a stopped TTY until the TTY was resumed with the start char (typically
ctrl-Q), which was inconsistent with the behavior of other Unix systems.

Signed-off-by: Joe Peterson <joe@skyrush.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/n_tty.c