Linux Application Development-Nameless pipeline programminga Linux interprocess communication (IPC)
1 UNIX interprocess communication
2 System V-based communication
3 POSIX communication
27 Modes of communication
1 piping
One process writes data at the end of the pipe, another process from the head of the pipe
Read the data. Pipelines include nameless pipes and two kinds of famous pipes, the former can only be used
Communication between the parent and child processes, which can be used to run on the same system
Communication between any of the two processes.
Classification:
Nameless Pipe (Pipo): Used for communication between parent and child processes
Well-known pipeline (FIFO): Used for communication between any two processes running on the same system
Characteristics:
1 pipeline communication is unidirectional, with fixed read and write ends.
2 When the data is read out of the pipeline by the process, the data does not exist in the pipeline.
3 when the process goes to read the empty pipeline, the process blocks.
4 The process is blocked when the process is writing data to a full pipeline.
5 Pipe capacity is 64KB (#define Pipe_buffers 16
include/linux/pipe_fs_i.h)
Use:
Create a pipeline before creating a child process
3 Signal (signal)
4 Message Queuing
5 Shared memory
6 Signal Volume
7 socket (SOCKET)
Linux application Development-nameless pipeline programming