[lkml]   [2000]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: /dev/console should it always be available?
   Date:   Sat, 26 Feb 2000 21:08:33 +0100
From: Guest section DW <>

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
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:56    [W:0.064 / U:0.344 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site