Next: Redirection Up: Streams Previous: Streams

Predefined Streams

UNIX defines 3 predefined streams (in stdio.h):

stdin, ~stdout, ~stderr

They all use text a the method of I/O.

stdin and stdout can be used with files, programs, I/O devices such as keyboard, console, etc.. stderr always goes to the console or screen.

The console is the default for stdout and stderr. The keyboard is the default for stdin.

Predefined stream are automatically open.
Wed Sep 14 10:06:31 BST 1994