do_kernel_restart(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… do_kernel_restart(9) ✨

okay bestie, welcome to the Kernel API Manual page for do_kernel_restart β€” it's giving β€œrestart handler call chain execution” and we're gonna make it make sense 🫢


🌸 NAME 🌸

do_kernel_restart β€” Execute kernel restart handler call chain. That's the name, no cap πŸ’–


✨ SYNOPSIS ✨

void do_kernel_restart (char *cmd );

πŸŽ€ ARGUMENTS πŸŽ€

  • cmd β€” pointer to the buffer containing the command to execute for the restart, or NULL. That's literally the whole assignment πŸ¦‹

πŸ’… DESCRIPTION πŸ’…

So this function calls the functions that were registered with register_restart_handler. Main character energy: it runs the restart handler call chain πŸ”₯

It's expected to be called from machine_restart as the last step of the restart sequence. That's the vibe check, bestie β€” last step, no skipping ahead ✨

If a restart handler function has been registered, it restarts the system immediately. Otherwise it does nothing. Periodt πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file: ./kernel/reboot.c 🧚


mwah πŸ’‹ this page lives in ./kernel, dated October 2026, and the footer still says do_kernel_restart(9) β€” bye bestie, go restart responsibly 🌈🫢

πŸ“¦ where this page comes from