Now we can analyze the source code of Linux kernel.Ii. inheritance between fork () and stderr and stdio. stdout in execve ()In fact, it seems that the word "inherit" is not accurate. To be more accurate, replication may be more appropriate.First,
1. Basic Concepts
A, I/O redirection is usually related to FD, Shell FD is usually 10, namely 0~9;
b, commonly used FD has 3, for 0 (stdin, standard input), 1 (stdout, standard output), 2 (stderr, standard error Output), the default and keyboard,
Redirection, environment variables, and Shell functions of advanced shell script Programming
Shell is not limited to simply executing commands line by line. One of the more powerful functions is the ability to create functions and function
> and when it comes to I/O redirection, let's get to know file descriptor (FD) first. The operation of the program, in most cases, is the processing of data (data), which is read from where? And where to send it? This is the function of file
Article Title: tip: "Disable" Echo output from Linux terminal. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Article Title: Linux redirection details. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
I/O redirection
Inux redirection refers to modifying some of the original default items and changing the default execution mode of the original system commands, for example, if I don't want to see the output on the monitor, but want to output the inux redirection
After a little change, make a little change to the example of the previous foundation.Concurrent server, the Server fork () a new child process per request.Compile and run the method in the previous
1. Basic concepts (this is the prerequisite for understanding the following knowledge. please be sure to understand it)
A, I/O redirection is usually related to fd, and shell FD is usually 10, that is, 0 ~ 9;
B. There are three commonly used FD
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.