Linux Interprocess communications
B. Scott Burkett, scottb@intnet.net v1.0, 29 March 1995
6.1 Introduction
The Linux IPC (Inter-process communication) facilities provide a method for multiple processes
to communicate with one another. There are several methods of IPC available to
Linux C programmers:
• Half-duplex UNIX pipes
• FIFOs (named pipes)
• SYSV style message queues
• SYSV style semaphore sets
• SYSV style shared memory segments
• Networking sockets (Berkeley style) (not covered in this paper)
• Full-duplex pipes (STREAMS pipes) (not covered in this paper)
These facilities, when used effectively, provide a solid framework for client/server development
on any UNIX system (including Linux).
6.2 Half-duplex UNIX Pipes
6.2.1 Basic Concepts
Simply put, a pipe is a method of connecting the standard output of one process to the
standard input of another. Pipes are the eldest of the IPC tools, having been around since
the earliest incarnations of the UNIX operating system. They provide a method of one-way
communications (hence the term half-duplex) between processes.
This feature is widely used, even on the UNIX command line (in the shell).
ls | sort | lp
No comments:
Post a Comment