[Linux][Pipe] Why fd[0] stands for read and fd[1] stands for write?

Actually this is a question I asked in StackOverflow.

Here is the address of this question: http://stackoverflow.com/questions/29921246/why-fd1-is-write-and-fd0-is-read?noredirect=1#comment47967631_29921246

As you can see in the description of this question. I understand 0(stdin) as write and 1(stdout) as read.

But actually I think it as human beings, but not as a program or a process way.

So stdin for a program or a process is read because when a human being input something, the process or program read from them. So as stdout, it’s write.




Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.