15th. Inter-process pass 15.5 FIFO

Source: Internet
Author: User

(1) What are named pipes, unnamed pipes?

Unnamed pipes: can only be used between two related processes, and these two related processes also have a common primary process that creates them.

Named pipes: FIFO, unrelated processes can also exchange data.

(2) FIFO is a file type.

Creating a FIFO is similar to creating a file, and the path name of the FIFO exists with the file system.

(3)

The function Mkfifo,mkfifoat creates a FIFO and opens it with open (the effect of the O_nonblock non-blocking flag).

Applications can create FIFO with the Mknod and Mknodat functions.

(4) FIFO has two purposes.

1) Copy the output stream from a series of shell commands. For example, a filtered input stream needs to be processed two times (separately).

(implemented by the TEE program: This program copies its standard input to its standard output and to the file named in its command line)

2) Use FIFO for client process-server process pass.



15th. Inter-process pass 15.5 FIFO

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.