freezer_fork(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– freezer_fork(9) πŸ’–

okay bestie, welcome to the <pink>freezer_fork</pink> page from the Kernel API Manual β€” yes we're in the kernel docs now, and honestly? we're slaying 🧊✨


🌸 NAME 🌸

freezer_fork β€” the cgroup post-fork callback, aka the little function that shows up right after a task gets forked 🫢


✨ SYNOPSIS ✨

void freezer_fork (struct task_struct *task );

that's it, that's the whole signature β€” void, one argument, iconic behaviour πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • task β€” a task which has just been forked. literally brand-new, fresh out the fork, main character energy πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

so task has just been created (congrats to it πŸŽ‰) and it should conform to the current state of the cgroup_freezer it belongs to. like, it needs to match the vibe of its cgroup freezer, periodt.

now here's the spicy part 🌢️ β€” this function may race against freezer_attach. and if we lose that race? honestly no big deal, we don't have to do anything πŸ’€ because freezer_attach will put task into the appropriate state itself. so losing here is lowkey a win, we just vibe and let freezer_attach handle it 🫢

no cap, the race is real, but the outcome's fine either way β€” just know who's doing the actual state-setting 😌

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./kernel/cgroup/legacy_freezer.c plus the whole freezer friend group:

go read them, iykyk πŸ“šβœ¨


aaaaand that's the page!! 🌈 mwah πŸ’‹ this one lives in ./kernel/cgroup and it's dated October 2026 β€” so mark your calendar bestie, future vibes only πŸ”₯πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from