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