[lkml]   [2002]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Why does x86_64 support a SuSE-specific ioctl?
    In article <>,
    Alan Cox <> wrote:
    >I see no good reason for this ioctl at all, in any tree.

    Check out 'bootlogd.c' in sysvinit.

    It starts at boot time, created a tty/pty pair, and does a TIOCCONS
    on it. Everything that gets written to /dev/console now goes
    ty the pty, so it can log all output.

    However you still want to see the output on the screen. But
    you can't copy it to /dev/console, because you'd get it right
    back in the pty.

    So you need to know what the _real_ console is so you can write
    a copy to the real console. The only way to find that out is
    to call TIOCGDEV on /dev/console, then scan /dev. That is
    what bootlogd does, I've tried to get TIOCGDEV in the kernel
    since 2.2 days but gave up because it was ignored. So bootlogd
    has always been 'experimental', though it is very useful,
    since it has no kernel support.

    Now, to solve this particular problem, there are a few

    One is a TIOCCONS_COPY ioctl, so that output is not redirected
    but copied to the pty.

    Another, perhaps more elegant solution is that writes
    to the pty slave that receives the console output should
    go to the real console. A swap instead of a redirect.

    The last one probably makes more sense - it seems
    very logical, and is trivial to implement.


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

     \ /
      Last update: 2005-03-22 13:29    [W:0.024 / U:40.372 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site