"UNIX" What is inter-process FIFO communication and signaling communication

Source: Internet
Author: User

The nameless pipe communication in the previous article is the communication between the parent-child process, which restricts the communication between the processes, so that there is a well-known pipeline, which can make communication between different processes, the famous pipe can be indicated by specifying the path name, the soldier long file system is visible. The process operates on a well-known pipeline through file Io, and a well-known pipeline adheres to the FIFO principle, but does not support the Lseek function.

1) int Mkfifo (const char *pthname,mode_t mode) creates a named pipe,

2) Create objects in the kernel, but do not open read and write, the famous pipe read and write to open themselves,

3) file objects create file nodes in the file system,

4) in two processes, it will only be created once, if a node is not created, the second creation will return an error message,

General form functions of FIFO:


Signal communication

1) signal communication is a simulation of the interrupt mechanism at the software level, and it is an asynchronous communication mode.

The signal can interact directly between the user space process and the kernel process, which can also be used by the kernel process to inform the user of what system events have occurred in the space process.

If the process is currently in an inactive state, the signal is saved by the kernel until the process resumes execution and then passed to it, and if a signal is set to block by the process, the transmission of the signal is delayed until the block is canceled before it is passed to the process.

2) life cycle of the signal




"UNIX" What is inter-process FIFO communication and signaling communication

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.