On Sat, May 27, 2000 at 08:53:41PM +0200, Juergen lorenz wrote:
Wie bekomme ich den file descriptor eines Terminals? Reicht der Befehl "open ("/dev/tty1")" o.ae. aus?
aus /usr/share/info/libc.info.gz:
You can use the `ctermid' function to get a file name that you can use to open the controlling terminal. In the GNU library, it returns the same string all the time: `"/dev/tty"'. That is a special "magic" file name that refers to the controlling terminal of the current process (if it has one). To find the name of the specific terminal device, use `ttyname'; *note Is It a Terminal::
Torsten