Ordinary Pipes

Ordinary pipes (Anonymous pipes on Windows) are one-directional. Data is written into the pipe on one end and then is read from the pipe at the other end. (When the two processes need to communicate back and forth, then a second pipe is created.) Such pipes can be used only between parent and child processes.

On UNIX/Linux, an ordinary pipe is created via the pipe() system call, while a Windows process calls CreatePipe() to create one.

Ordinary pipes are only accessible within the process that created them. That is, if a process that terminates hasn't closed the pipes, the pipe is anyway 'destroyed' once the process terminates.

Typically, a parent creates the pipes before forking a child. Since a child process always inherits open files from its parent on UNIX/Linux, including the pipe file(s), a channel of communication is then established. On Windows, the programmer must specify that the child has to inherit the pipes.