Tag:
stderr
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 [...]
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 [...]