April 2014
Beginner
534 pages
14h 4m
English
Now, process 0 is at privilege level 3, which is a process state. As a parent process, its first task is to call fork() to create the first child process—process 1, which is the first implementation of the parent–child process-creating mechanism. On the basis of this mechanism, all processes are created by the parent process later.
In Linux, any new process is created by calling fork(). The procedure is shown in Figure 3.1.
The code is as follows:
//code path:init/main.c: ......static inline _syscall0(int,fork)//correspond to forkstatic ...
Read now
Unlock full access