LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   source for init (/sbin/init) (http://www.linuxquestions.org/questions/linux-kernel-70/source-for-init-sbin-init-624383/)

ashok449 02-28-2008 01:12 AM

source for init (/sbin/init)
 
Dear All,

where is the source for init i.e, /sbin/init executable



Thanks ...

jlliagre 02-28-2008 02:59 AM

Init isn't part of the Linux kernel. It is special as being a userland program called by the kernel though. There are several implementations available. The most used one is Sysvinit: http://freshmeat.net/projects/sysvinit/

sundialsvcs 03-02-2008 04:20 PM

For background ...

init is "the ancestor of all things." When the system is initializing itself, it does basic initialization of the kernel and then, by hand, it creates a user-land process called init, running as the 'root' user. This is, traditionally, "process #1."

By definition, init must start and it must not die. If it does, you'll get various "kernel panics" and your system will stop-dead.

init does all of the user-land process initialization work, as specified in /etc/inittab.

Furthermore, init is the system's "grim reaper," its funeral director of last resort. All processes are responsible for cleaning up after their offspring, and if anyone doesn't, init does. This also gives it the opportunity to recognize things like logging-off: under certain conditions, init is what re-spawns the getty process so that a login: prompt re-appears.

Unix has a delightfully minimalist approach to most things. . .


All times are GMT -5. The time now is 07:21 AM.