4 Creation and Execution of Process 2

Image 4.1 Open the Terminal Device File and Copy the File Handle

Shell is a user-interface (UI) process. Through shell, computer users implement human–computer interactions with operating systems by using the monitor and the keyboard (terminal equipment).

4.1.1 Open the Standard Input Device File

Figure 4.1 shows the scene after tty0 file has been loaded.

4.1.1.1 File_table[0] is Mounted to Filp[0] in Process 1

After the root file system is loaded, process 1 opens the standard input device file by calling the open function. The code is as follows:

//code path:init/main.c:void init(void){    int pid,i;    setup((void ...

Get The Art of Linux Kernel Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.