diff options
-rw-r--r-- | drivers/char/n_tty.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 596c7173997b..e0e3815f92ba 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c | |||
@@ -769,7 +769,21 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c) | |||
769 | signal = SIGTSTP; | 769 | signal = SIGTSTP; |
770 | if (c == SUSP_CHAR(tty)) { | 770 | if (c == SUSP_CHAR(tty)) { |
771 | send_signal: | 771 | send_signal: |
772 | isig(signal, tty, 0); | 772 | /* |
773 | * Echo character, and then send the signal. | ||
774 | * Note that we do not use isig() here because we want | ||
775 | * the order to be: | ||
776 | * 1) flush, 2) echo, 3) signal | ||
777 | */ | ||
778 | if (!L_NOFLSH(tty)) { | ||
779 | n_tty_flush_buffer(tty); | ||
780 | if (tty->driver->flush_buffer) | ||
781 | tty->driver->flush_buffer(tty); | ||
782 | } | ||
783 | if (L_ECHO(tty)) | ||
784 | echo_char(c, tty); | ||
785 | if (tty->pgrp) | ||
786 | kill_pgrp(tty->pgrp, signal, 1); | ||
773 | return; | 787 | return; |
774 | } | 788 | } |
775 | } | 789 | } |