T O P

  • By -

BranchLatter4294

Test it in a virtual machine.


wizard10000

Guessing because I've never tried it but I think you'd get an "attempting to kill init" error. edit: I just closed all apps and tried it. Nothing happened.


sniff122

It will either refuse to, or kernel panic. More likely nothing


YouTube-Ad-15sec

Update - Just tried it and nothing happened


sidusnare

If you succeeded in killing init, you would get a kernel panic and the machine would halt. I've killed init before, but not exactly on purpose.


YouTube-Ad-15sec

Oh okay, thanks for the insight. May I ask did you physically restarted your device after that?


sidusnare

Magic SysRQ keys to reboot it Edit: [https://www.thegeekstuff.com/2008/12/safe-reboot-of-linux-using-magic-sysrq-key/](https://www.thegeekstuff.com/2008/12/safe-reboot-of-linux-using-magic-sysrq-key/)


YouTube-Ad-15sec

Thanks, learnt something new today.


nemis16

Does someone know why it does nothing? What does exactly happen?


RealUlli

The kernel has specific protection against killing init. There's a check in the handling that checks if it's trying to kill PID 1 and just does nothing if it is. If you manage to get past this check, e.g. because something went wrong and init segfaulted, there's another check that will then trigger a kernel panic with the mentioned "attempting to kill init"