| 645 | } |
| 646 | |
| 647 | void ttydisc_modem(struct lwp_tty *tp, int open) |
| 648 | { |
| 649 | tty_assert_locked(tp); |
| 650 | |
| 651 | if (open) |
| 652 | cv_broadcast(&tp->t_dcdwait); |
| 653 | |
| 654 | /* |
| 655 | * Ignore modem status lines when CLOCAL is turned on, but don't |
| 656 | * enter the zombie state when the TTY isn't opened, because |
| 657 | * that would cause the TTY to be in zombie state after being |
| 658 | * opened. |
| 659 | */ |
| 660 | if (!tty_opened(tp) || CMP_FLAG(c, CLOCAL)) |
| 661 | return; |
| 662 | |
| 663 | if (open == 0) |
| 664 | { |
| 665 | /* |
| 666 | * Lost carrier. |
| 667 | */ |
| 668 | tp->t_flags |= TF_ZOMBIE; |
| 669 | |
| 670 | lwp_tty_signal_sessleader(tp, SIGHUP); |
| 671 | tty_flush(tp, FREAD | FWRITE); |
| 672 | } |
| 673 | else |
| 674 | { |
| 675 | /* |
| 676 | * Carrier is back again. |
| 677 | */ |
| 678 | |
| 679 | /* XXX: what should we do here? */ |
| 680 | } |
| 681 | } |
| 682 | |
| 683 | static int ttydisc_echo_force(struct lwp_tty *tp, char c, int quote) |
| 684 | { |
no test coverage detected