How to create pipes in Linux


System call pipe()

In Linux, pipe is created by system call pipe(). Type man 2 pipe in terminal to see details.

$ man 2 pipe

When you read the manual page, try to answer the following questions:

  • Q5: What is used for the parameter "int pipefd[2]"?
  • Q6: What will be returned by pipe()?