Welcome to the Linux Foundation Forum!

LFS201 Killing processes

Hi! I would like to know what happens after killing a process, with kill -9 . Is it killed just as long as the current login session is active or its effects are permanent and there is another mechanism to reactivate the process?

And if the init process is killed, the same mechanism that applies to a single process will also apply to init?

I am feeling confused because on the internet there are many opinions on how to work with Linux systems and some of them are contradictory.

Comments

  • coop
    coop Posts: 915

    kill -9 (or kill -19) is terminate with extreme prejudice. Dead Dead Dead. Nothing remains and it can not be restarted. (It is not a suspend signal).

    If you kill the init process, you kill the system immediately and it crashes. Most of the time you cannot do this, but if you manage to kill init that is the only thing that can happen. Your system may restart from scratch and if killing is done properly you don't have to crash (you have to kill init to shutdown anyway).

    yes it is true, you always have to view Internet information with a grain of salt; it is not just that some is of dubious quality, but a lot of it is simply obsolete (try to look at the dates of the information!) Fortunately you have a lot of information already on your system in the form of "man pages", and that is almost always accurate and up to date. So try to look there first.

  • luisviveropena
    luisviveropena Posts: 1,144

    Hi @MariaRalucaDiaconescu ,

    You may find some useful information here:

    https://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html

    Look for "sigkill".

    Regards,
    Luis.

Categories

Upcoming Training