| 101 | } |
| 102 | |
| 103 | void ttydisc_close(struct lwp_tty *tp) |
| 104 | { |
| 105 | /* Clean up our flags when leaving the discipline. */ |
| 106 | tp->t_flags &= ~(TF_STOPPED | TF_HIWAT | TF_ZOMBIE); |
| 107 | tp->t_termios.c_lflag &= ~FLUSHO; |
| 108 | |
| 109 | /* |
| 110 | * POSIX states that we must drain output and flush input on |
| 111 | * last close. Draining has already been done if possible. |
| 112 | */ |
| 113 | tty_flush(tp, FREAD | FWRITE); |
| 114 | |
| 115 | #ifdef USING_BSD_HOOK |
| 116 | if (ttyhook_hashook(tp, close)) |
| 117 | ttyhook_close(tp); |
| 118 | #endif |
| 119 | } |
| 120 | |
| 121 | static int ttydisc_read_canonical(struct lwp_tty *tp, struct uio *uio, |
| 122 | int ioflag) |
no test coverage detected