Communicating With Standard IO Streams
00:00
In this lesson, you’ll be diving into communication with processes. Every process has standard input and output streams. So let’s say you have a process and there is some input—that is called standard in. stdin
stands for standard in, and that feeds into the process and therefore in sub-processes that we’ve been using.
00:24 Now, usually it’s the user who fills up the standard in via the keyboard, or in other words, the user types into the terminal, and that then feeds into the process.
00:37
On the output side, there are two standard output streams. One is called stdout
, and the other one is called stderr
. And so the process fills up the stdout
and the stderr
, and then usually by default, these will show up on the terminal.
00:55 So a process runs, and then there’s output in the terminal. And if there are errors, then that will also be seen by the user in the terminal. Now, output can also be stored in a file.
01:07 So by default, it goes through the terminal, but you can choose for that to be saved somewhere in a file, or you can choose for it to be saved somewhere in a buffer.
01:18
On the input side, that applies just as well. The stdin
which is usually from the keyboard or through the keyboard can also come from a file.
01:28 A process can read from a file, or it can come from a buffer.
01:34 So this will be important later in the course when we talk about pipes.
01:39 In the next lesson, you learn how to decode these standard streams.
Become a Member to join the conversation.