Tag:
stdin

Find controlling terminal with ttyname

by
on
November 6, 2008

You can identify the path the the controlling terminal device path for your current process in C with the ttyname() system call. This controlling terminal can be a virtual console (/dev/ttyn) or a pseudo-terminal (/dev/pts/n). The ttyname system call takes the following format. char *ttyname(int fd); The stdin, stdout, stderr file descriptors unless redirected are [...]

Read More
No Comments
C

I/O redirection in BASH

by
on
October 16, 2008

One of the best features of the Linux command line is the ability to efficiently direct input and output to and from files and other programs. Every program begins with 3 open file streams. stdin (file descriptor 0) – input from the user, usually keyboard stdout (file descriptor 1) – standard output that is displayed [...]

Read More
No Comments
bash
Copyright 2008-2010 WiredRevolution.com. All rights reserved.