|
@@ -769,7 +769,21 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
|
|
signal = SIGTSTP;
|
|
signal = SIGTSTP;
|
|
if (c == SUSP_CHAR(tty)) {
|
|
if (c == SUSP_CHAR(tty)) {
|
|
send_signal:
|
|
send_signal:
|
|
- isig(signal, tty, 0);
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Echo character, and then send the signal.
|
|
|
|
+ * Note that we do not use isig() here because we want
|
|
|
|
+ * the order to be:
|
|
|
|
+ * 1) flush, 2) echo, 3) signal
|
|
|
|
+ */
|
|
|
|
+ if (!L_NOFLSH(tty)) {
|
|
|
|
+ n_tty_flush_buffer(tty);
|
|
|
|
+ if (tty->driver->flush_buffer)
|
|
|
|
+ tty->driver->flush_buffer(tty);
|
|
|
|
+ }
|
|
|
|
+ if (L_ECHO(tty))
|
|
|
|
+ echo_char(c, tty);
|
|
|
|
+ if (tty->pgrp)
|
|
|
|
+ kill_pgrp(tty->pgrp, signal, 1);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|