Relative Content

Tag Archive for processlinux-kernelshutdown

Termination of init process in linux shutdown

When performing shutdown, the init process calls the function from shutdown.c ( https://github.com/systemd/systemd/blob/main/src/shutdown/shutdown.c ) which prepares the system for power off, such as killing all the other processes and etc. after that it calls the reboot from reboot.c ( https://github.com/torvalds/linux/blob/master/kernel/reboot.c ) which does the final operations to shutdown. I would like to know how the init process himself exists or killed as per the manual, the init process can only receive signals which have installed handlers – https://man7.org/linux/man-pages/man2/kill.2.html. so SIGKILL and SIGTERM might be out of the question. thanks in advance.