IO - Standard streams (stdin, stdout, stderr)
1 - About
Standard Streams are a feature of many operating systems. By default, they:
- read input from the keyboard
- and write output to the display.
They are the building block of interaction with the user in a command line environment. The application catch them and manipulate them to interact with the user or other programs.
The three I/O connections are called:
- standard input (stdin) - Read from the keyboard or from a redirection such as the pipe.
- standard output (stdout) - Print to the display and can be redirected as standard input.
- and standard error (stderr) - Same as stdout but normally only for errors. Having error output separately allows the user to divert regular output to a file and still be able to read error messages.
They are properties of every process
2 - Articles Related
3 - Language
4 - Method
4.1 - Redirection
Standard streams also support I/O on files and between programs, but that feature is controlled by the command line interpreter, not the program.