PDA

View Full Version : Terminal window device name



c.pergiel
February 26th, 2009, 08:36 AM
I have a simple C program that runs in a terminal window and processes input from stdin.
I want to talk to the user (printing and getting keyboard input) even if stdin is redirected to a file.
I'm thinking I need a device name. Does anyone know what that name would be?
"console" doesn't work, and neither does "/dev/console".
I can compile and run the same program in a DOS box under windows using the name "con".