aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/n_tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/n_tty.c')
-rw-r--r--drivers/char/n_tty.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index 596c7173997b..90c3969012a3 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -695,17 +695,16 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
695 return; 695 return;
696 } 696 }
697 697
698 if (tty->stopped && !tty->flow_stopped &&
699 I_IXON(tty) && I_IXANY(tty)) {
700 start_tty(tty);
701 return;
702 }
703
704 if (I_ISTRIP(tty)) 698 if (I_ISTRIP(tty))
705 c &= 0x7f; 699 c &= 0x7f;
706 if (I_IUCLC(tty) && L_IEXTEN(tty)) 700 if (I_IUCLC(tty) && L_IEXTEN(tty))
707 c=tolower(c); 701 c=tolower(c);
708 702
703 if (tty->stopped && !tty->flow_stopped && I_IXON(tty) &&
704 ((I_IXANY(tty) && c != START_CHAR(tty) && c != STOP_CHAR(tty)) ||
705 c == INTR_CHAR(tty) || c == QUIT_CHAR(tty)))
706 start_tty(tty);
707
709 if (tty->closing) { 708 if (tty->closing) {
710 if (I_IXON(tty)) { 709 if (I_IXON(tty)) {
711 if (c == START_CHAR(tty)) 710 if (c == START_CHAR(tty))
@@ -769,7 +768,21 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
769 signal = SIGTSTP; 768 signal = SIGTSTP;
770 if (c == SUSP_CHAR(tty)) { 769 if (c == SUSP_CHAR(tty)) {
771send_signal: 770send_signal:
772 isig(signal, tty, 0); 771 /*
772 * Echo character, and then send the signal.
773 * Note that we do not use isig() here because we want
774 * the order to be:
775 * 1) flush, 2) echo, 3) signal
776 */
777 if (!L_NOFLSH(tty)) {
778 n_tty_flush_buffer(tty);
779 if (tty->driver->flush_buffer)
780 tty->driver->flush_buffer(tty);
781 }
782 if (L_ECHO(tty))
783 echo_char(c, tty);
784 if (tty->pgrp)
785 kill_pgrp(tty->pgrp, signal, 1);
773 return; 786 return;
774 } 787 }
775 } 788 }