pipe() (12.2)
The pipe() system call creates an internal system buffer and two file descriptors: one for reading and one for writing
With a pipe, typically want the stdout of one process to be connected to the stdin of another process … this is where dup2() becomes useful (see next slide and figure 12-2 for examples)
Usage:
int fd[2];
pipe( fd ); /* fd[0] for reading; fd[1] for writing */