Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In the linux kernel, where is the first process initialized?

Tags:

linux-kernel

I'm looking for the code in the linux kernel (2.4.x) that initializes the first process, pid=0.

Many searches provided many clues, but I still cannot find it.

Any pointers, anyone?

like image 801
Tzafrir Avatar asked Dec 12 '22 23:12

Tzafrir


1 Answers

The initial task struct is set up by the macro INIT_TASK(), defined in include/linux/init_task.h. All other task structs are created by do_fork.

like image 63
caf Avatar answered Apr 28 '23 18:04

caf