Re: /dev/console should it always be available?

From: Guest section DW (dwguest@win.tue.nl)
Date: Sat Feb 26 2000 - 19:08:08 EST

  • Next message: David Odin: "__elevator_merge"

    On Sat, Feb 26, 2000 at 04:18:41PM -0500, Theodore Y. Ts'o wrote:

    > From: Guest section DW <dwguest@win.tue.nl>
    >
    > You need to watch out for the problem that programs print messages to
    > stdout or stderr without checking first whether fd 0, 1, 2 actually were
    > open when the program was started. If some init variant opens /dev/console,
    > and dups the fd twice to get 0,1,2 all will be fine with a console, but
    > without a console programs may be called without good stdout and stderr.
    > If now mount or e2fsck or some other program opens a disk device, and
    > later prints something it may be printed to your disk instead of screen.
    >
    > I don't know about mount, but e2fsck has had defensive coding to prevent
    > exactly this problem since version 1.13.

    It was fixed in mount in util-linux version 2.9.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Feb 26 2000 - 19:12:07 EST