Bloomberg L.P. Interview Question: Pipe system call in UNIX.... |

Interview Question

Financial Software Developer Intern Interview New York, NY (US)

Pipe system call in UNIX.


Interview Answer

2 Answers


Redirecting the output of each process directly as input to the next one process.

Peter on 12 Jan 2011

A pipe is a method of stream-based interprocess communication like fifo's and network sockets. After creating a pipe via the pipe(...) system call, you're given two file descriptors that represent the read and write end of the pipe. It's uni-directional which means that one process always writes to the pipe and the other process always reads from it. In short, it's a one-way buffer that lives in memory (i.e. it's fast). It is reliable since every byte written will be read while the pipe exists. And it is FIFO. Pipes are often used between a parent process and its forked children processes.

Josh on 13 May 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.