http://blog.csdn.net/jason314/article/details/5640969The fork () call will copy a new process that is almost identical to the current process (except for the fork's return value), each of which has its own space, each with its own local variables,
Fork introduction:Fork stands for the meaning of "branching and branching". In the operating system, fork is a famous Unix (or Unix-like, such as Linux or minix) to create a sub-process.
[Note1]What is the role of Fork? In other words, what is the
Transferred from: http://blog.csdn.net/jason314/article/details/5640969First, Fork Introduction knowledgeA process, including code, data, and resources assigned to the process. The fork () function creates a process that is almost identical to the
Fork introduction:Fork stands for the meaning of "branching and branching". In the operating system, fork is a famous Unix (or Unix-like, such as Linux or minix) to create a sub-process.
[Note1]What is the role of Fork? In other words, what is the
In Unix systems, the only way to create a new process is to call the fork system. The process called fork is called the parent process, and the newly created process is called the child process. Syntax format of system call:
PID = fork ();
When
First, fork introductory knowledgea process that includes code, data, and resources assigned to the process. The fork () function creates a process that is almost exactly the same as the original process through system calls, where two processes can
The only way to create a new process in Linux is to use the fork () function. The fork () function is a very important function in Linux, and there are some differences from previous functions, because the fork () function looks like it executes
What if we wanted to call 1 shell scripts or execute 1 Bash shell commands when we were writing 1 C programs?
In fact, the header file contains 1 function system () that calls the shell command or script, and it is convenient to simply pass the
Fork is one of the most difficult concepts to understand: it executes once but returns two values.First, let's look at the prototype of the fork function:# include # include pid_t fork (void);return value:Negative number: If there is an error, fork (
0 Preface
Last week, I was reading the eighth chapter of advanced programming in the Unix environment-process control. In this chapter, I understand the principles of some processes in UNIX. Next I will mainly explain the three most important
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.