[Inter-process communication] Pipe communication {The purpose of inter-process communication; Common methods of inter-process communication; Anonymous pipe: Implementation principle, pipe symbol |, system call pipe, process pool; Named pipe: mkfifo instruction, system call mkfifo}

1. The purpose of inter-process communication Most of the code we wrote before was a single-process task. A single process cannot use the concurrency function of the process, nor can it realize the collaborative work of multiple processes. Therefore, we need to implement multi-process tasks, and the key to multi-process is inter-process communication. Inter-process communication […]

[Linux] Process Communication Part I: Pipeline process pipe, mkfifo, unlink

Article directory 1. Anonymous channels 1. Create a pipeline pipe 2. Characteristics of the pipeline 3. Four scenarios 2. Named pipes 1. Linux command: mkfifo (creation of named pipes) 2. Function mkfifo 3. Function unlink 4. Named pipe code example Inter-process communication: Inter-Process Communication, abbreviated as IPC 1. Anonymous pipe 1. Create a pipeline head […]