LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-10-2009, 03:37 PM   #1
satyaredhat
LQ Newbie
 
Registered: Mar 2009
Posts: 6

Rep: Reputation: 0
why we cannot kill process id 1 with command "kill -9 1"


why we cannot kill process id 1 with command "kill -9 1"
 
Old 03-10-2009, 03:42 PM   #2
arckane
Member
 
Registered: Sep 2005
Location: UK
Distribution: Gentoo/Debian/Ubuntu
Posts: 307

Rep: Reputation: 38
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.
 
Old 03-10-2009, 03:55 PM   #3
Maligree
Member
 
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Blog Entries: 1

Rep: Reputation: 42
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..
 
Old 03-10-2009, 11:04 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by satyaredhat
why we cannot kill process id 1 with command "kill -9 1"
Why are you trying to kill init?
 
Old 03-11-2009, 09:07 AM   #5
satyaredhat
LQ Newbie
 
Registered: Mar 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Wink

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
 
Old 03-11-2009, 01:00 PM   #6
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,613

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
satyaredhat:

you can kill PID 1 init
send signal to runlevel 0 or 6
 
Old 03-11-2009, 01:15 PM   #7
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 372
Blog Entries: 2

Rep: Reputation: 32
Quote:
Originally Posted by malekmustaq View Post
satyaredhat:

you can kill PID 1 init
send signal to runlevel 0 or 6
how do you send signal to runlevel?
 
Old 03-11-2009, 01:48 PM   #8
Maligree
Member
 
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Blog Entries: 1

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A process I have to kill "neopomukservices" AGazzaz Mandriva 3 01-16-2009 03:30 AM
Use only one "kill" to kill father and child processes Xosen Programming 7 08-28-2008 04:33 AM
How to remove defunct process without reboot and without "kill -9 ppid()" ? murugesan Linux - Software 2 07-17-2008 06:54 AM
suse 10.0 => processes "sending kill signal": "done, done, missing"...!? ungua Linux - Newbie 2 01-18-2006 11:52 AM
just typed "ps x" how can i kill a process then? kublador Linux - General 2 05-29-2003 01:23 PM


All times are GMT -5. The time now is 01:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration