register_reboot_notifier(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ register_reboot_notifier(9) β€” the kernel API manual glow-up ✨

okay so bestie, welcome to the register_reboot_notifier(9) page πŸ’… this is a Kernel API Manual entry and honestly? it's a little baddie with one job and it does it perfectly πŸŽ€


🌸 NAME 🌸

register_reboot_notifier β€” literally just: register a function so it gets called at reboot time ⭐ like, that's the whole vibe. reboot era incoming πŸ”₯


πŸ’– SYNOPSIS πŸ’–

int register_reboot_notifier (struct notifier_block *nb );

that's it, that's the whole signature, no cap 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • nb β€” info about the notifier function that's gonna get called πŸ‘‘ this struct is the whole personality holder: it's where you tell the kernel which function to ring up when reboot o'clock hits 😭

🧚 DESCRIPTION 🧚

okay so what this does: it registers your function into the list of functions that get called at reboot time πŸ“‹βœ¨ so when the machine goes down for its little reboot nap, your function is on the guest list πŸ’Œ

and here's the iconic part β€” it currently always returns zero, because blocking_notifier_chain_register always returns zero. so the return value is giving zero, slay, no drama, no surprises πŸ’€βœ¨

lowkey important: this isn't us guessing at behaviour, it's literally in the docs β€” the "currently" is doing a lot of work there, iykyk πŸ™ˆ

🌈 SEE ALSO 🌈

the way that's a whole friend group of reboot/shutdown besties 😭🫢 go read them all, fr fr.


and that's the page!! πŸ’œ before you go: this lil masterpiece lives in the ./kernel source tree, it's October 2026 energy, and it's filed as register_reboot_notifier(9) β€” go forth and be the main character of your own notifier chain πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from