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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-10-2009, 02:37 PM
|
#1
|
LQ Newbie
Registered: Mar 2009
Posts: 6
Rep:
|
why we cannot kill process id 1 with command "kill -9 1"
why we cannot kill process id 1 with command "kill -9 1"
|
|
|
03-10-2009, 02:42 PM
|
#2
|
Member
Registered: Sep 2005
Location: UK
Distribution: Gentoo/Debian/Ubuntu
Posts: 308
Rep:
|
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.
|
|
|
03-10-2009, 02:55 PM
|
#3
|
Member
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Rep:
|
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..
|
|
|
03-10-2009, 10:04 PM
|
#4
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Rep: 
|
Quote:
Originally Posted by satyaredhat
why we cannot kill process id 1 with command "kill -9 1"
|
Why are you trying to kill init?
|
|
|
03-11-2009, 08:07 AM
|
#5
|
LQ Newbie
Registered: Mar 2009
Posts: 6
Original Poster
Rep:
|
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
|
|
|
03-11-2009, 12:00 PM
|
#6
|
Senior Member
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669
|
satyaredhat:
you can kill PID 1 init
send signal to runlevel 0 or 6
|
|
|
03-11-2009, 12:15 PM
|
#7
|
Member
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373
Rep:
|
Quote:
Originally Posted by malekmustaq
satyaredhat:
you can kill PID 1 init
send signal to runlevel 0 or 6
|
how do you send signal to runlevel?
|
|
|
03-11-2009, 12:48 PM
|
#8
|
Member
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Rep:
|
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 08:47 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|