| 604 | } |
| 605 | |
| 606 | void |
| 607 | ttydisc_modem(struct tty *tp, int open) |
| 608 | { |
| 609 | |
| 610 | tty_assert_locked(tp); |
| 611 | |
| 612 | if (open) |
| 613 | cv_broadcast(&tp->t_dcdwait); |
| 614 | |
| 615 | /* |
| 616 | * Ignore modem status lines when CLOCAL is turned on, but don't |
| 617 | * enter the zombie state when the TTY isn't opened, because |
| 618 | * that would cause the TTY to be in zombie state after being |
| 619 | * opened. |
| 620 | */ |
| 621 | if (!tty_opened(tp) || CMP_FLAG(c, CLOCAL)) |
| 622 | return; |
| 623 | |
| 624 | if (open == 0) { |
| 625 | /* |
| 626 | * Lost carrier. |
| 627 | */ |
| 628 | tp->t_flags |= TF_ZOMBIE; |
| 629 | |
| 630 | tty_signal_sessleader(tp, SIGHUP); |
| 631 | tty_flush(tp, FREAD|FWRITE); |
| 632 | } else { |
| 633 | /* |
| 634 | * Carrier is back again. |
| 635 | */ |
| 636 | |
| 637 | /* XXX: what should we do here? */ |
| 638 | } |
| 639 | } |
| 640 | |
| 641 | static int |
| 642 | ttydisc_echo_force(struct tty *tp, char c, int quote) |
no test coverage detected