# Mkfifo myfifo# PingEdu.cn> myfifo
Open another terminal:# Cat myfifo
See the results.
Mkfifo command
Purpose
Create a first-in-first-out (FIFO) special file.Syntax
Mkfifo [-M mode] File...Description
Based on the specified sequence, the mkfifo
From: http://cpp.ezbty.org/content/science_doc/linux%E4%B8%8B%E8%BF%9B%E7%A8%8B%E9%97%B4%E9%80%9A%E4%BF%A1%EF%BC%9A%E5%91%BD%E5%90%8D%E7% AE %A1%E9%81%93_mkfifo
SummaryThere are many methods for inter-process communication. FIFO and pipelines are
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
Background:Work there are two of remote computer room need to transmit data, data full name is standard, in a directory named Unified prefix plus number. such as/path/from/file. {1..100}. While the special line of the machine room is limited to the
Interprocess communication must be provided through the kernel channel, and there must be a way to identify a channel provided by the kernel in the process, which is identified by an open file descriptor. If several processes to communicate with
Script commandWhen you work in a terminal or console, you may want to record everything you do in the terminal.These records can be used as historical data to save everything that happens to the terminal.SCIRPT is a command that can make a record of
Transferred from: http://blog.sina.com.cn/s/blog_605f5b4f0101azuc.htmlThe method for creating a named pipe is: Mkfifo pipe_name.This allows you to create a named pipe pipe_name.Run the command and redirect the output to the pipeline and throw the
1, pipeline overview and related API application1.1 Key concepts related to pipingThe pipeline is one of the original UNIX IPC forms supported by Linux and has the following features:
The pipe is half-duplex, the data can only flow in one
A "FIFO" is a special type of file that allows independent processes to communicate. A process opens a FIFO file for write operations, and another process reads it. The data can then be run in the same way as anonymous pipelines that are common
Use pipelines for programming in Linux
Http://www.lupaworld.com/tutorial-view-aid-10366.html
Introduction
In this article, we will learn about the GNU/Linux pipeline. Although the pipeline model is very old, it is still a very useful inter-process
Introduction
In this article, we will learn about the GNU/Linux pipeline. Although the pipeline model is very old, it is still a very useful inter-process communication mechanism. We will learn what a semi-bidirectional pipeline is and what a famous
Inter-process communication (5)
1. Preface all the examples in this article are based on the RHEL6.5 platform. The previous article introduced anonymous pipelines. Click this link.
2. A major restriction for introducing MPs queue applications is
Inter-process communication-pipelines-Linux Kernel Analysis (8)MPs queue
A pipe is a one-way communication mechanism between two processes.
Because pipelines transmit data in one direction, pipelines are also called half-duplex pipelines.
This
Linux inter-process communication (IPC) Programming Practice (2) FIFO naming Pipeline
In the previous article, we explained how to use anonymous pipelines to transmit data between processes, and also saw a defect in this method, these processes are
/** Create a simple chat program using a named Pipeline*/# Include # Include # Include # Include # Include # Include # Include # Include Int main (){Int I, RFD, WFD, Len = 0, fd_in;Char STR [32];Int flag, stdinflag;Fd_set write_fd, read_fd;Struct
Let's start by talking about the general purpose of interprocess communication (IPC), such as data transfer, shared data, notification events, resource sharing, and process control. But we know that for each process the process sees a piece of
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
A pipeline is one-way, first-out, which connects the output of one process with the input of another. One process (write process) writes data at the end of the pipeline, and another process (read process) reads the data from the head of the pipe.
Common Linux C functions-Signal Processing-general Linux technology-Linux programming and kernel information. For more information, see the following section. Alarm)
Related functions: signal, sleep
Header file # include
Define the function
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.