From bfcf09eef1b31a3a649d9c9bd3e7bfac5e846213 Mon Sep 17 00:00:00 2001 From: Bill Joy Date: Tue, 19 Jan 1982 09:58:21 -0800 Subject: [PATCH] TIOCSTOP TIOCSTART SCCS-vsn: sys/kern/tty.c 4.18 --- usr/src/sys/kern/tty.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/usr/src/sys/kern/tty.c b/usr/src/sys/kern/tty.c index 29a4483045..5ed3408fff 100644 --- a/usr/src/sys/kern/tty.c +++ b/usr/src/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* tty.c 4.17 82/01/17 */ +/* tty.c 4.18 82/01/19 */ /* * TTY subroutines common to more than one line discipline @@ -460,6 +460,26 @@ caddr_t addr; else (*linesw[tp->t_line].l_rint)(c, tp); break; + + case TIOCSTOP: + c = spl5(); + if ((tp->t_state & TS_TTSTOP) == 0) { + tp->t_state |= TS_TTSTOP; + (*cdevsw[major(tp->t_dev)].d_stop)(tp, 0); + } + splx(c); + break; + + case TIOCSTART: + c = spl5(); + if ((tp->t_state & TS_TTSTOP) || (tp->t_local & LFLUSHO)) { + tp->t_state &= ~TS_TTSTOP; + tp->t_local &= ~LFLUSHO; + ttstart(tp); + } + splx(c); + break; + /* end of locals */ default: -- 2.20.1