Just replying to a random message in this thread.

Maybe we should just implement /dev/console in such a way that it can
never get stuck on dcd. I've seen this break too many times.

Below is an untested patch. Anyone willing to test it for me?

As Jeremy did point out, FreeBSD's TTY/serial/etc code really lacks a
true console device which multiplexes both input and output to all
serial devices.

%%%
Index: tty.c
===================================================================
--- tty.c       (revision 212549)
+++ tty.c       (working copy)
@@ -282,7 +282,8 @@
 
        /* Wait for Carrier Detect. */
        if (!TTY_CALLOUT(tp, dev) && (oflags & O_NONBLOCK) == 0 &&
-           (tp->t_termios.c_cflag & CLOCAL) == 0) {
+           (tp->t_termios.c_cflag & CLOCAL) == 0 &&
+           dev != dev_console) {
                while ((ttydevsw_modem(tp, 0, 0) & SER_DCD) == 0) {
                        error = tty_wait(tp, &tp->t_dcdwait);
                        if (error != 0)
%%%

-- 
 Ed Schouten <e...@80386.nl>
 WWW: http://80386.nl/

Attachment: pgp5bVOCevFGN.pgp
Description: PGP signature

Reply via email to