Introduction: Pipelines are the oldest IPC method on Unix systems, and pipelines provide an elegant solution: given the two processes that run different programs, how can the output of one process in the shell be used as input to another process?
Pipeline is not a name, so it can only be used between the process of affinity, to pipe name, we call it a well- known pipeline FIFO, of course, there is no difference between FIFO and pipe name, there are other differences are mentioned below.
Linux inter-process communication-famous pipelines (FIFO) and linuxfifoFamous pipe (FIFO)
Named Pipes are also called FIFO files, which are special files. Since all linux objects can be regarded as files, the use of Named Pipes becomes very
In "MySQL Insert/Update data" This article mentions that, using the load data infile statement, you can load data from a file directly into MySQL, but if the file is very large, you may also need to cut the file, multiple loads, in which case, You
Basic Concepts:
Pipelines have no names, so their greatest disadvantage is that they can only be used between processes that have a common ancestor process. We cannot create a pipe between unrelated processes and use it as an IPC pipe (regardless of
Organized from Network
Unix IPC includes: pipelines, named pipelines (FIFO), and signals (Signal)
Pipeline (pipe)
Pipelines can be used for communications between kinship-related processes. Famous pipelines overcome the restriction that pipelines
4. Read and write the FIFOUse of the O_nonblock mode affects the read and write calls to the FIFO.To an empty, blocked FIFO(That is, it is not opened with the O_nonblock flag)The read call will wait until there is data that can be read to continue
1. Use FIFO to copy the output stream
Pipelines can only be used for linear connections between processes, while FIFO has a name, so they can be used for non-linear connections.
Use FIFO and Unix systemsProgramTee, you can achieve the process
Inter-process communication must pass through the channel provided by the kernel, and there must be a way to identify a channel provided by the kernel in the process. The previously mentioned anonymous channel is identified by the opened file
The earliest IPC form on UNIX systems is pipeline, and pipeline creation uses the pipe function:
#include
int pipe (int pipefd[2]);
The function creates a one-way pipeline that returns two descriptors pipefd[0], and
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.