Results 1 to 3 of 3
I have a simple C program that processes a input either from file or from stdin.
I want to be able to talk to the user (print messages and get ...
- 02-26-2009 #1Just Joined!
- Join Date
- Sep 2008
- Location
- Silicon Forest, Oregon
- Posts
- 4
Terminal window device name
I have a simple C program that processes a input either from file or from stdin.
I want to be able to talk to the user (print messages and get keyboard input) even when stdin has been redirected to a file.
I figure a need a device name, but have been unable to find one the will work.
Running in a DOS box under Windows the name "con" works.
I have tried "con", "console", "/dev/console" under Linux, but none of these names work.
- 02-26-2009 #2Just Joined!
- Join Date
- Feb 2009
- Location
- location, location
- Posts
- 18
Does /dev/tty0 work?
Text-Terminal-HOWTO: Terminal Special Files such as /dev/tty : see section 6.5
- 02-27-2009 #3Just Joined!
- Join Date
- Sep 2008
- Location
- Silicon Forest, Oregon
- Posts
- 4
Thanks for the suggestion, but no, /dev/tty0 does not work.
I've tried several different names, but no luck so far.


Reply With Quote