lkml.org 
[lkml]   [2000]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: /dev/console should it always be available?
       Date:   Sat, 26 Feb 2000 21:08:33 +0100
    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.

    - Ted


    -
    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/

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