Mailinglist Archive: opensuse (3470 mails)

< Previous Next >
Re: [SLE] How do I kill a Zombie?
  • From: Alin Dobre <alin.dobre@xxxxxxxxxxxxxxxx>
  • Date: Tue, 23 Sep 2003 09:23:18 +0300
  • Message-id: <3F6FE6D6.2040801@xxxxxxxxxxxxxxxx>

It works
killall -1 init
restarts the init process (for example the inittab file is re-read).
(HUP) signal works, so "for which it has not installed a signal handler" is not true.


Mads Martin Joergensen wrote:
* Jim Norton <jrn@xxxxxxxxxxxxxxxxxxxxx> [Sep 23. 2003 01:54]:

Just don't kill the parent if the parent is INIT. That would be bad. :-)

... and fortunately it's not possible to kill init :)

So the kernel doesn't allow INIT to be killed by anything not of it's doing
to prevent the system from being stopped if INIT was killed?

Well, the kill(2) syscall is just a program to send a signal to a
process. So it's up to the program to implement proper signal handling.
In the case of process 1 (init), there's the following note in kill(2):

"It is impossible to send a signal to task number one, the init
process, for which it has not installed a signal handler. This
is done to assure the system is not brought down accidentally."

Does the kernel ever kill init itself ( for a reboot for example )? Or does
it just enter a runlevel and sit and wait for the PC to reboot etc?

Well, what do you mean "if the kernel kills init"? At some point init
tell the kernel it wants to reboot/shutdown, simply by doing all the
preparation (nice shutdown of all processes etc.) and then when time
permits, calls reboot();

It's good reading to take a stroll through the source-code for init and
friends, if one wants to get acquainted with this stuff.

Technical Support Engineer - RAV Division
This message is confidential. It may also be privileged or otherwise protected by work product immunity or other legal rules. If you have received it by mistake please let us know by reply and then delete it from your system; you should not copy the message or disclose its contents to anyone.

< Previous Next >