Re: Design for setting video modes, ownership of sysfs attributes

From: P. Benie
Date: Sun Sep 19 2004 - 10:02:08 EST


On Sun, 19 Sep 2004, Pascal Schmidt wrote:
> On Sun, 19 Sep 2004 12:00:21 +0200, you wrote in linux.kernel:
> > The FDs 0, 1 and posibly 2 will be the console.
>
> *The* console? They can all be connected to different console
> devices (think redirection). I'd think for video mode questions,
> you'd look at stdout...

Early versions of stty made that mistake - to find out what settings your
printers had, you ended up printing the output of stty on paper.

If you're going to subvert an fd, use stdin, not stdout.
stdin is less valuable most commands use argv rather than stdin, and it
allows you to retreive the output of a command using the shell `backtick`
operators.

Peter

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