Design for setting video modes, ownership of sysfs attributes
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
On Sun, 19 Sep 2004 12:00:21 +0200, you wrote in linux.kernel:
Quoted 1 line
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...
Signature · 2 lines
Ciao, Pascal
Quoted 6 lines · Pascal Schmidt
On Sun, 19 Sep 2004 12:00:21 +0200, you wrote in linux.kernel:
Quoted 1 line
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
Quoted 4 lines · P. Benie
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
backtickoperators.
The point is, you need to make a choice if you want to infer the tty from an fd. You can't assume stdin and stdout point to the same console. And if we talk about video mode settings, why would I want to use the fd that the command gets keyboard input from?
The shell backtick obviously uses stdout of the command inside the backticks. ;)
Signature · 2 lines
Ciao, Pascal