[lkml]   [2000]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Serial Console
    On Tue, 5 Dec 2000, Steve Hill wrote:

    > On Tue, 5 Dec 2000, PaulJakma wrote:
    > > how? symlink to /dev/ttyS0, or with console=ttyS0 boot option?
    > console=ttyS0
    > Nope, /dev/console *does* block.

    very weird.. the reason i replied to you, even though i have no direct
    experience of serial console, was that last night i read a mail on the
    linux-mips on almost exactly the same subject (serial console being
    quite common on linux-mips), and IIRC Ralf Baechle explained how there
    was a fundamental difference between tty and console precisely because
    /dev/console might not be going anywhere.

    Quoting from Ralf's email:

    "/dev/console (as chardev 5/1) differs from another device in some important

    - When opened by a process without controlling tty it will not become
    a CTTY even if the NOCTTY flag is not set.

    - It will never block but rather loose data. This may sound like a
    disadvantage but it's actually very important for proper operation.
    For example, if /dev/console'd block due to a serial console with
    hardware handshaking enabled (DON'T) syslogd writing to it may also
    block for an unbounded time and thus as soon as /dev/log is full all
    services trying to log via syslog(3) will also freeze.

    Syslogd actually tries to be clever about avoiding this from
    happening but fails to handle one case correctly, so this is a real
    world scenario.

    - It uses different routines to access the console device than normal
    write access to i.e. ttyS0."

    perhaps linux-mips is just different? or i386 serial-console is

    > ATM I've found a quick workaround - I
    > use "stty -F /dev/console clocal -crtscts" to turn off the serial flow
    > control at the stawrt of /etc/rc.d/rc.sysinit - this seems to work quite
    > well... of course it doesn't stop some program turning flow control back
    > on and ballsing it all up again :)


    /dev/console having non-blocking semantics sounds much cleaner.



    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:51    [W:0.020 / U:6.928 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site