DUP Function: Copy file descriptorRelated header files: # include Function expression: int DUP (INT filedes );Parameter description: The DUP function parameter filedes indicates the file descriptor of the file to be copied.Return Value Description:
The system calls DUP and dup2 to copy the file descriptor. The DUP returns a new file descriptor (the smallest number that is not used by the file descriptor). Dup2 can let the user specify the value of the returned file descriptor, and, if
Today, see DUP and dup2 system calls, is not too understanding, first write a little simple application examples.
DUP and dup2 are used to copy file descriptors.
Function Prototypes:
#include
int dup (int oldfd);
int dup2 (int oldfd,int
This article was reproduced from: http://blog.csdn.net/tennysonsky/article/details/45870459DUP () and dup2 () are two very useful system calls that are used to copy the descriptor of a file so that the new file descriptor also identifies the file
Resources:Http://www.tldp.org/LDP/lpg/node11.htmlhttp://blog.csdn.net/yeyuangen/article/details/6852682Http://blog.sina.com.cn/s/blog_65c5c5990100mx6d.htmlPipeline is a very important way of communication in Linux , is to connect the output of a
Let's take a look at the figure below:
When I/O redirection is performed, only the FD of different input tables points to the same file table structure.
The following important functions are used for I/O redirection:
int dup( int oldfd );int dup2(
The following code is taken from Linux 0.11. Although the code is outdated, its implementation is very intuitive and simple. It is of great value and help for understanding dup implementation. Through this code, you can easily understand the
Reproduced from: http://blog.csdn.net/orange_os/article/details/7485069
Directory:
1. Linux system call principle
2. Implementation of System call
3. Linux system call Classification and list
4. System call, User programming Interface (API), System
[Reprint] study on how nt loads ntldr nt guidance 1
Http://forum.eviloctal.com/thread-17505-1-1.html
Source: www.hackart.org
Author: windy men
The operating system boot process is as follows:1. the BIOS reads the MBR to 0000: 7c00 and submits the
Section 8 Chapters Exception Control FlowControl Flow: Controls the transfer sequence.Control transfer: From an instruction to the next instruction.Exception control Flow: The modern operating system responds to the system state by causing mutations
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.