- if (x >= TTYHOG/2 && putc(tp->t_stopc, &tp->t_outq) == 0) {
- tp->t_state |= TS_TBLOCK;
- ttstart(tp);
+ /*
+ * Block further input iff:
+ * Current input > threshold AND input is available to user program
+ */
+ if (x >= TTYHOG/2 &&
+ ((tp->t_flags & (RAW|CBREAK)) || (tp->t_canq.c_cc > 0))) {
+ if (putc(tp->t_stopc, &tp->t_outq)==0) {
+ tp->t_state |= TS_TBLOCK;
+ ttstart(tp);
+ }