[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Re: nailing-up serial connections

Bryan Stansell bryan@conserver.com
Mon, 15 Oct 2001 11:43:43 -0700 (PDT)


Hi Andreas,

Conserver used to re-open downed lines automatically.  I recently
changed it so that it wouldn't do that.  The reason?  In most cases it
caused conserver to respawn processes and run in a fairly tight loop,
causing the load to rise, etc.  It all depended on the situation, but
it usually wasn't very pretty.  I'd like the code to try and reopen the
console once and then force it down if it fails, but that'll have to be
in the future.  Because of the change, you and others are now seeing
another problem of treating console lines like modems instead of
hardwired terminals (carrier loss drops the line).

7.1.2 (which should be out in a day or two - depends on how fast I
package it up) will have the following code change...

In conserver/consent.c you'll see a line:

    termp.c_cflag = CREAD;

change that to:

    termp.c_cflag = CREAD | CLOCAL;

I'm looking at changing the non-termios based code as well, but since I
don't have a machine to test it, I'm fearful of putting in the code.
It would be something like:

    if (-1 == ioctl(pCE->fdtty, TIOCLBIS, LNOHANG) {
        Error("ioctl3: %d: %s", pCE->fdtty, strerror(errno));
        return -1;
    }

and put somewhere near the TIOCSLTC code in TtyDev().  I'm also not
sure how many people out there have non-termios based systems still -
it could all be dead code these days and should just be removed.

Bryan

On Mon, Oct 15, 2001 at 07:57:11AM -0400, Andreas Wrede wrote:
> I have a couple of serial consoles connected to a conserver 7.1.1.
> When one of the attached servers reboots conserver drops the console
> connection, but it does not re-aquire it until a 'console' issues a
> ^Eco. Is there any way to nail-up serial console connections so that
> the connections is not dropped in spite of CD going low?
> 
> -- 
>     - aew