LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   why we cannot kill process id 1 with command "kill -9 1" (https://www.linuxquestions.org/questions/linux-newbie-8/why-we-cannot-kill-process-id-1-with-command-kill-9-1-a-710570/)

satyaredhat 03-10-2009 02:37 PM

why we cannot kill process id 1 with command "kill -9 1"
 
why we cannot kill process id 1 with command "kill -9 1"

arckane 03-10-2009 02:42 PM

That's the kernel init if memory serves me correctly. Think about it, if you killed the kernel you'd crash the whole thing. So, protected.

Maligree 03-10-2009 02:55 PM

Funny, I always thought that killing init would cause a reboot. Of course, it makes a lot of sense to protect the process that is parent to all other processes on the system.

I swear, it used to force a reboot..

anomie 03-10-2009 10:04 PM

Quote:

Originally Posted by satyaredhat
why we cannot kill process id 1 with command "kill -9 1"

Why are you trying to kill init?

satyaredhat 03-11-2009 08:07 AM

Maligree/arckane
thanks for your input , It looks the init process is built in such way that it cannot be killed with "kill -9 <pid> " and that is because it shouldn't be killed as it will crash the system .

anomie
I am not trying to kill init process , its a query regarding the usage of kill command with signal 9

malekmustaq 03-11-2009 12:00 PM

satyaredhat:

you can kill PID 1 init
send signal to runlevel 0 or 6

QueenZ 03-11-2009 12:15 PM

Quote:

Originally Posted by malekmustaq (Post 3472035)
satyaredhat:

you can kill PID 1 init
send signal to runlevel 0 or 6

how do you send signal to runlevel?

Maligree 03-11-2009 12:48 PM

QueenZ, you can change your current runlevel with telinit <level>. But that's definitely not what you'd call killing init.


All times are GMT -5. The time now is 09:25 AM.