LinuxIPC communication-pipeline (PIPE, FIFO)

Source: Internet
Author: User
LinuxIPC communication-pipeline (PIPE, FIFO) this article will summarize LinuxIPC communication and summarize your understanding of IPC. This article mainly introduces pipelines and famous pipelines. Pipeline (PIPE, FIFO): 1. usage: LinuxIPC is an old communication method, which is suitable... linux IPC communication-pipelines (PIPE and FIFO) this article will summarize Linux IPC communication and summarize your understanding of IPC. This article mainly introduces pipelines and famous pipelines. Pipelines (PIPE and FIFO): 1. usage: an old Linux IPC communication method. it is suitable for communications with a small amount of data and is often used for control commands. Ulimit-a can see the pipe size (512 bytes,-p) 8 4k2, features: half duplex mode, for example, cmd process A-> process B ack process B-> process A3. the famous pipe differs from the unknown one. The unknown pipe applies to the communication between processes with kinship. A famous pipeline can communicate with any process through pipeline files. 4. pipeline use steps famous Pipeline: (1) mkfifo create pipeline File (2) open pipeline file, set properties, write blocking, read non-blocking (3) read (4) write unknown pipeline: (1) pipe (2) set blocking and non-blocking attributes (3) pipe [0] for read pipe [1] for write5. note: (1) SIGPIPE if the communication party of the pipeline has disabled fd, and the local party must report this signal for the first time, and the second segment exits due to an error, the signal must be processed (2) half duplex mode 6. Special usage: inter-thread communication: suitable for transferring addresses such as buf addresses with large data volumes

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.